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
Answer Posted / 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 |
Post New Answer View All Answers
What are INPUT PROCEDURE and OUTPUT PROCEDURE?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
i was faced one question- i have value -00001234.56 Suppress the zeroes and the output should be -1234.56 But Not - 1234.56 spaces should not be available after suppressing the zeroes. logic in jcl and cobol?
How do get the result of your program directly on your pc?
How to traceback if I am getting SOC7 or SOC4 abend? List down the steps
Why occurs cannot be used in 01 level in COBOL?
What are the different rules to perform a Search?
how do you reference the rrds file formats from cobol programs
What is the utilization of copybook in cobol?
EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?
How do you define a variable of comp-1 and comp-2?
how do you reference the printer file formats from cobol programs
Mention the guidelines to write a structured cobol program?
Which is not true about evaluate statement
What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?