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 Ddm ?
i am using non join multiple format my 3 database file is like that pf97 R REC ENAME ETENNO ESTATUS K ENAME pf98 R REC1 ENAME ESAL K ENAME PF99 R REC3 ENAME CRDCARD EID K EID & MY NON JOIN LOGICAL FILE IS ALSO SAME EXCEPT RECORD NAMES BEFORE I TRIED WITH 2 FILES SO ITS SAYS ERROR I.E.(Key field attributes must be same as for previous formats. ) SO I CHANGED KEYFIELD ACCORDING TO PF SO ITS WORKING BUT AFTER ADDING 3 FILES ITS SAYING SAME ERROR . I DONT KNOW I NEW IN AS400 PLLZ HELP ME I HAVE ONE MORE QUE. CANT BE USE DIFFERENT KEYFIELD (NOT ACCORDING TO PF) IN NON JOIN LOGICAL FILE.
what would be the effect on the field where reverse image, underline and highlight display attributes were active?
What Is The Purpose Of The "n" In The Following Calculation Specification?
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?
what is the difference between *like and *namvar ?
which of the cl command can be used to determine which logical files are dependent on a specific file?
explain the difference between defining subfile and message-subfile?
what are the three types of keywords associated with printer file ?
when would you prefer logical file than opnqryf?
some special characters I key in my html source members show different on my web pages. Why? How can I solve this?
how many levels are there in a physical file?
what does opcode post do ?
can a single screen format occupy a screen area above and below a subfile format ?
what is a program described file in rpg?