How can you check the existence of object in a system?
Answer Posted / 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 View All Answers
Which command is used to replace CDUP command in FTP IF i WANT TO USE SFTP?
what if my system I runs with system value qccsid 65535?
how can a cgi check whether an ifs object is available?
What Is The Difference Between Goto & Exsr?
how do you use exceptional write in c specs?
how many files, printer files you can describe in a rpg?
difference between view and index ?
is their a difference in cobol400 for the release 5.2 and 6.1 at the as400.
Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?
some special characters I key in my html source members show different on my web pages. Why? How can I solve this?
what is the maximum number of parameters allowed in rpg?
how many levels are there in a physical file?
What is difference between rename and prefix?
Explain this error: "all record formats for externally-described file abcd ignored or dropped due to error; file ignored."?
how do you specify page overflow indicator for printer files in rpg?