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



01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access..

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

01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access..

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

01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access..

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

01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access..

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

01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access..

Answer / sree

by using perform

Is This Answer Correct ?    0 Yes 5 No

Post New Answer

More COBOL Interview Questions

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???

5 Answers   IBM,


How do u initialize an array?

2 Answers   CTS,


1.give the details about WHEN OTHER. 2. how many form are available in evaluate.

0 Answers   IBM,


can any one give good example for cond 88 level number and for renames pls urgent dudes ?

3 Answers   DELL,


what is the maximum error code in mainframe

2 Answers  






What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?

0 Answers  


how can u find out just by seeing wheater it is main program or sub program ? any two ways to identify reply soon ?

2 Answers  


can we read records in a file from botom to top. if possible how can we read

12 Answers   ACS,


can any one help -s806

6 Answers  


) How do u handle errors in BMS macro?

0 Answers   IBM,


WT R TECHNICAL MAINFRAME QUESTION ASKED IIN ANJANASOFTEARE??

1 Answers  


INREC AND OUTREC? HOW TO SPLIT 5K RECORDS TO DIFFERENT FILES IN A FILE IN COBOL? RESTART IN COBOL-DB2? ISOLATION LEVELS?

0 Answers  


Categories