How can you add a particular field/coloumn in copybook?

Answers were Sorted based on User's Feedback



How can you add a particular field/coloumn in copybook?..

Answer / prasad perla

1st we need to be clear where the need come into picture for adding a field.
Suppose 
1-Q) If needs add a field any where in the record structure is fine , then.
1-A)We can add a field in copy book by adjusting the filler at the end the record layout for the detailed/Header/Trailer record.
2-Q) If suppose a field is in the middle of layout and a requirement came like to add a sub-field under the group field which is in the middle of layout.
 Then we can add but the layout field positions will get changed due to inserting a field in middle of structure. so here impact is more and changes as well more.
3-Q) After adding a field either as per the option 1 or option 2 , needs to be look in all programs where do we have used the copy book and those all programs needs to be changed accordingly and re-complied with new copy book to get the new load.

might be i have wrote bit more for your understanding... thought it would be helpful.

Is This Answer Correct ?    34 Yes 0 No

How can you add a particular field/coloumn in copybook?..

Answer / ajinkya bijagare

If Copybook changes(Table changes)are done like insertion of new field.
1) Re-compile the copybook after changes are done.
2) Find all the COBOL program and subprograms which is having SELECT, INSERT,DELETE, UPDATE DB2 statements.
3) Check if needed to insert newly added field name in the query. If yes do so and Re-compile all changed programs and subprograms.
4) In this way new Cobol program load module will get created with new copybook.

Is This Answer Correct ?    1 Yes 0 No

How can you add a particular field/coloumn in copybook?..

Answer / dinesh rathod

You need to modify the underlying data file to match your file definition in COBOL. One way to do so would be to define a line of output exactly like what lines of your data look like now, but with an extra Pic x(10) on the end of it. You would then read in your data line by line, and output it to a new location 

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More COBOL Interview Questions

1.Can we define condition-name conditions in FD entry.

11 Answers  


How do you come out of an EVALUATE statement?

3 Answers  


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

0 Answers  


wht is the use of evalute verb ? how do u declare recfm in cobol and jcl ?

2 Answers   EDS,


What is 66 level number and where it is used in real time by software developers?

2 Answers   ITC Indian Tobacco Company, TCS,






What are differences between COBOL and java ? why we are giving more preference to COBOL ?

3 Answers   TCS,


What is the difference between comp and comp-3?

0 Answers  


how can count the number of character in feild ?? suppose for instance i have a feild with value ' rajesh sarkar' then how can v count the number of characters whitout spaces...........

4 Answers   Wipro,


What is the meaning of 'TALLING' verb in cobol?

5 Answers  


record length in spool?

2 Answers   Infosys,


What will happen if we generate GDG (+2) version without generating (+1) version?

2 Answers   IBM, T systems,


study the following code 01 A1 05 B PIC 99 05 C PIC X(4) 01 A2 05 B PIC 99V99 05 C PIC A(4) pick out the valid statement from the following a.A1 and A2 can not have sub-ordinates b.A1 and A2 can have the same sub-ordinates but must have same PIC clause c.there is nothing wrong d.A1 and A2 can have same sub-ordinates provided they are not at 01 level

4 Answers   TCS,


Categories