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 |
What is a library list ?
what is a primary file?
What is the purpose of SFLNXTCHG keyword in a subfile?
why is the declare cursor statement is used for?
Determine the value of the result field a. Cost = $110. 00 b. Tax = 20% c. MarkUp= 05% d. Sale = 10%
what is the maximum number of files allowed in rpg?
Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?
what does opcode post do ?
what are the various types of device files?
What is the use of L specs in RPG?
how may a cgi control duplicate inputs?
what is library?