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

where will control be passed after the execution of the *pssr subroutine if the factor2 of the endsr is blank ?

1 Answers   IBM,


how to handle job errors in as400 what is the command and where can we find out whether the job has any errors

2 Answers   Virtusa,


What is Data Area?

1 Answers  


What is the difference between externally described file and program described file?

1 Answers  


Suppose you have 3 members in a database file. How to read records from all the members Without using CL (OVRDBF) i.e. it should be handled exclusively in an RPG program?

6 Answers   IBM,






What the difference between Source Physical File and Physical File?

1 Answers  


What is the purpose of Level Check parameter in a Physical file?

1 Answers  


define data structure?

1 Answers   IBM,


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

0 Answers   IBM,


writing an sql statement from selecting records from two files using single statement and nested select statement.

0 Answers   IBM,


how can I control the way a remote browser uses its cache?

0 Answers   IBM,


How do you put jobs in batch mode?

1 Answers  


Categories