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

How would the number +1234 be stored if a PIC clause of PICTUREs9(4) comp-3 were used?

6 Answers  


I have 2 dimensional array with having 100 elements. So how to find the 11th item in an array?

6 Answers   IBM,


I have a PS file and I would like to manually insert the binary values (like a COMP format) into the file. How can i do that? the way do in COMP-3 format.. suppose i want to insert -12345 in to file in comp-3 format. simply we can open a file in edit mode and do HEX-ON and insert the value . SEE BELOW-- 135 24D in 3 bytes - this will be COMP-3 presenatation of -12345.

1 Answers  


what is the minimum number of lines a Cobol program should have to successfully compile and run

7 Answers  


write a cobol logic. i have file that has 10 records .1 record go to first output file and second record goes to 2 output and etc

0 Answers  


How to recover a deleted source physical file from library?

1 Answers   HCL,


How to find How Many Lines in Sysin DD * Parameter Thru Cobol Coding? If any one knows the Answer Please Reply .....Thanks From Shree

3 Answers   Merrill Lynch,


Difference between array and sub-script ?

0 Answers   HCL,


What are the different open modes available in cobol?

0 Answers  


Name some of the examples of COBOl 11?

0 Answers   CSC,


what is the default print format? in cobol

3 Answers   HSBC,


how we separate the cobol cics statements from cobol&cics programming?

1 Answers   Valtech,


Categories