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
What is compiler directive in as400? Give example of compiler directive.?
how can I predict the performance of my cgis?
what is procedure prototype and procedure interface.
how will you display a particular page in subfile ?
name few ibm supplied libraries?
how many printer files can be defined in f specs ?
which cl command is used to trap error messages during program execution?
can a join logical file be updated?
how would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?
which are the relational operators in rpg?
what would be the effect on the field where reverse image, underline and highlight display attributes are active ?
if we tried to move year part of *iso date into a field of length 3, what will happen ?
what is the version of os/400 that we have?
maximum number of subfiles that can defined in a rpg program for one display file is?
what does the opcode free do?