How can you check the existence of object in a system?



How can you check the existence of object in a system?..

Answer / nitin trivedi

With the help of CHKOBJ clp command, we can find existence of object on the system.
The usage of command in clp is as follows:
CHKOBJ OBJ(JBA001DT) OBJTYPE(*DTAARA)
MONMSG MSGID(CPF9801) EXEC(DO)
CRTDTAARA DTAARA(QGPL/JBA001DT) TYPE(*CHAR) LEN(6) +
VALUE('010196') TEXT('The last day that had job acct.+ data extracted')
ENDDO
RTVDTAARA DTAARA(JBA001DT *ALL) RTNVAR (&FROMDATE)

The execution of above steps is listed below:

steps

1: First it checks the data area object on the system.

2: If the data area object not found, the MONMSG command executes with the help of message identifier, next we can dynamically create the data area.
3. If the data area object found, control transfers to statement below ENDDO.

It is always good CLP programming approach to check the object before you rename, delete the objects on the system.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More IBM AS400 AllOther Interview Questions

WHAT is STORED PROCEDURE CONCEPT IN AS400 WITH EXAMPLE?

0 Answers  


How to inner join more than 2 PFs in a CL program using OPNQRYF command?

1 Answers  


how to create physical file

1 Answers  


how to get the cursor position?

0 Answers   IBM,


What are the two main attributes, which govern the execution of a job?

1 Answers  






What is LEVEL CHECK?

7 Answers   HCL, TCS,


What Does 'sr' In Columns 7-8 Of C Specs Mean?

1 Answers   IBM,


what are the limitations of cl (compare to rpg) ?

1 Answers   IBM,


What is class of service ?

1 Answers  


Hi friends i have i question please reply me asap. what would be coding in DDS and programing part for this condition suppose that i have three fields in the display file(subfile)which has 7 record format. Condition is ''The supplier LOT, ISSUED TO PROD and LINE GRP fields in display file(Subfile) will not be shown if their respective fields are blank/zero in the record formats WIM311FM and Record format WIM311FM. I want coding part in DDS and Programing. Please reply me as soon as posible.

1 Answers   IBM,


what is the version of os/400 that we have?

1 Answers   IBM,


maximum number of subfiles that can be active for a single file is?

1 Answers   IBM,


Categories