how to change picture class of copy book variable inside
program?

Answers were Sorted based on User's Feedback



how to change picture class of copy book variable inside program?..

Answer / sathishkumar

Hi,

Use Replacing option along with COPY.

Copy book(SAMPLE) defined as :

01 COPY REC
05 Emp-no 9(5).
05 name x(5).

If you want to change the Emp-No to 9(6).

Copy SAMPLE Replacing EMp-no by EMP-no1.
Define EMp-no1 as 9(6.

Is This Answer Correct ?    16 Yes 4 No

how to change picture class of copy book variable inside program?..

Answer / sandeep_1985

You need to redefine copybook group variable in program and
then give the new picture clause for that.

I think that is the only way you can do. Correct me if i am
wrong.

Is This Answer Correct ?    8 Yes 0 No

Post New Answer

More COBOL Interview Questions

I have a cobol program with a sub program. How ca i find that it is a dynamic call? or static call..?

3 Answers   HCL, IBM,


What is length is cobol?

0 Answers  


why occurs clause not mentioned in 01 level

6 Answers   HCL, NIIT, TCS, Tesco,


What are options have been removed in COBOL 11?

1 Answers  


how will u find out 3rd week's 2nd day using occurs ?

3 Answers   L&T,


Please let me know how the Eject verb works for page break.. I want to know the code, how it is used.

3 Answers  


What is the difference between static call & Dynamic call?

2 Answers   CSC, TCS,


If a sub program is called from mainprogram.I have opened cursor in main program and Fetch the result in subprogram ,Is it possible ?If yes please tell me the reason.

1 Answers  


Will the variable POS in the following code have a value of 2 or not? 01 POS PIC S9(4) COMP VALUE 2. 01 FIRST-NAME PIC X(10) VALUE 'ABC'. 01 LAST-NAME PIC X(10) VALUE 'XYZ'. 01 NAME PIC X(20) VALUE SPACES. STRING FIRST-NAME DELIMITED BY SPACES ' ' DELIMITED BY SIZE LAST-NAME DELIMITED BY SPACES INTO NAME WITH POINTER POS

2 Answers  


IDENTIFICATION DIVISION. PROGRAM-ID. MOVEPGM. DATA DIVISION. WORKING-STORAGE SECTION. 01 WS-I PIC 9(2). PROCEDURE DIVISION. A1000-MAIN-PARA. PERFORM PARA-X WITH TEST BEFORE UNTIL WS-I= 5 STOP RUN. PARA-X. DISPLAY "BEST2". I m getting error s722,while executing the program, seems getting in loop, can anybody tell me why

3 Answers  


i WANT ALL ERROR codes IN CICS and DB2

2 Answers  


What is Alternate Index ? How is it different from regular index ?

2 Answers  


Categories