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 |
I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?
How can we find that module can be called – whether DYNAMICALLY or STATICALLY?
How many divisions we have in Cobol ?
How can i load all the data from a file to Table (array) in cobol.How i manage the occurs clause with out reading the file.Any options avilable ? Please can any one help me it is urgent?
How will 128 be saved in s9 (3) comp-3 How will 12 be saved in s9 (2) comp
How to convert bunch of words in a line to relvant ASCII values?
what is dynamic array in cobol? what is the difference b/w array and table in cobol?
Name the sections present in data division.
i want a program using by if, evaluate , string, unstring, perform, occurs?
What is a subscript ?
what is sync clause?
What is difference between comp & comp-4?