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

Read filea And file b write the same records in both files? Records in a but not in b record in b but not in a

3 Answers   TCS,


what is amode(24), amode(31), rmode(24) and rmode(any)?

0 Answers  


How to remove the spaces at end of each record in the output file Via COBOL program? note: The file has a VB length

3 Answers   TCS,


I have a field with data type X(10). I want to perform arithmetic operation on this field? I tried doing it by moving the value into a numeric field. but it didn't work out. I am getting a S0C7 abend. Pls let me know if there is any way of getting this done?

1 Answers  


A paragraph PARA-X is to be executed when none of the data names A, B and C have value of 1. Which of the following will achieve this ? (a) IF A NOT = 1 OR B NOT = 1 OR C NOT = 1 PERFORM PARA-X (B) IF NOT A= 1 AND B= 1 AND C = 1 PERFORM PARA-X (C) IF A NOT =1 IF NOT B = 1 OR C= 1 PERFORM PARA-X (C) IF A NOT = 1 AND B NOT = 1 AND C NOT = 1 PERFORM PARA-X

3 Answers   TCS,






Why do we use COMP-3 variables for computation, when we know that they are non displayable fields and require additional MOVE to numeric field before we populate it in output Reports?

1 Answers   Accenture,


what is index and how to use two tables using index?

1 Answers  


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1 Answers  


01 a pic 9(9v99) 01 b pic 9(9.99) wht will be the stored vales in both cases

6 Answers   Patni,


what is the difference between Plan & package

3 Answers   IBM,


In COBOL, what is the different between index and subscript?

0 Answers   TryTechnicals Pvt Ltd,


How to display string in the reverse order using occurs clause?

4 Answers  


Categories