01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2
times. My qustion is how can we access the second name
Answers were Sorted based on User's Feedback
Answer / veena
occurs can never be used in the 01 level. and when the
clause is used in 02 level, the variable has to be in the
level below that.
01 ws-name1.
02 ws-name2 occurs 2 times.
03 ws-name. pic x(10).
and also pic clause cannot be used in the same statement of
the occurs clause.
Is This Answer Correct ? | 16 Yes | 7 No |
Answer / venkat
The OCCUR keyword can not be used in 01 level variable. But
it can be used in level below 01.
Eg:
01 WS-NAME.
02 WS-NAM-X PIC X(10) occurs 2 times.
01 Ws-TEST PIC X(10) value spaces.
We can access the second name variable WS-NAM-X(2).
Eg 1. MOVE WS-NAM-X(2) to Ws-TEST.
2. Display WS-NAM-X(2).
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / sriharichallagundla
occurs can never be used in the 01 level. and when the
clause is used in 02 level, the variable has to be in the
level below that.
01 ws-name1.
02 ws-name2 occurs 2 times.
03 ws-name. pic x(10).
Is This Answer Correct ? | 8 Yes | 1 No |
Answer / m.raghu
01 ws-name.
02 ws-name1 occurs 2 times.
03 ws-name2 pic x(10).
we can refer to second occurence element is: ws-name1(2).
Is This Answer Correct ? | 4 Yes | 0 No |
Consider the below example call a-test1. -- -- -- a-test1. if a=b perform a-test through a-exit next sentence else if b=c perform c-test through c-exit. if a=d perform d-test through d-exit. a-test. -- -- a-exit. exit. can u tell me what will happen if a=b after looping into a-exit will the control go back to a- test1. will the condition a=d be checked???
How do u initialize an array?
1.give the details about WHEN OTHER. 2. how many form are available in evaluate.
can any one give good example for cond 88 level number and for renames pls urgent dudes ?
what is the maximum error code in mainframe
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?
can we read records in a file from botom to top. if possible how can we read
can any one help -s806
) How do u handle errors in BMS macro?
WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??
INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?