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


Please Help Members By Posting Answers For Below Questions

What are INPUT PROCEDURE and OUTPUT PROCEDURE?

679


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.

1108


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?

887


How do get the result of your program directly on your pc?

1874


How to traceback if I am getting SOC7 or SOC4 abend? List down the steps

559






Why occurs cannot be used in 01 level in COBOL?

708


What are the different rules to perform a Search?

613


how do you reference the rrds file formats from cobol programs

790


What is the utilization of copybook in cobol?

650


EXPLAIN MAIN FRAME TESTING PROCESS...HOW TO FIX THE MAINFRAME BUGS?

2050


How do you define a variable of comp-1 and comp-2?

699


how do you reference the printer file formats from cobol programs

649


Mention the guidelines to write a structured cobol program?

603


Which is not true about evaluate statement

1565


What is the difference between Structured COBOL Programming and Object Oriented COBOL programming?

670