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

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

For rewrite, why is it mandatory that file needs to be opened?

623


What is the difference between Call and a Link?

700


Can we change the password using ALTER? anyone tried and changed?

1549


What are various search techniques in cobol? Explain.

650


What is the difference between next sentence and continue in cobol programing language?

712






What are the different open modes available in cobol?

722


how do you reference the variable block file formats from cobol programs

688


Write a program to enter and display the names of students in a class using the occurs clause.

654


How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?

744


What is the difference between PIC 9.99 and PIC9v99?

782


What is amode(31)

724


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

681


What is rmode(any) ?

686


Which mode is used to operate the sequential file?

669


how do you reference the printer file formats from cobol programs

665