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

i have the following varibles in the working storage 05 ws-A PIC X(30) VALUE 'ABCDEFGHIJKLMNOPQRESTUVWXYZ ' 05 WS-B REDEFINES WS-A 10 WS-B1 PIC X(10). 10 WS-B2 PIC 9(10). 10 WS-B3 PIC X(10). If I Display B1, B2 and B3 respectively, what is the value displayed in B2

9 Answers  


how to display comp3 variables reply soon ?

4 Answers   Patni,


How do pass the values to the parameters in cobol

2 Answers  


Can you please let me know the centre name of INS certification in Kolkata.

0 Answers  


Scenario: I have 3 Input Files.Read the first i/p file and depending on certain business logic, I want to read wither i/p file-2 or i/p file-3.Now, depending on certain business logic applied to the record read from either file-2 or file-3, I decide to write them to either output file-2 or output file-2. Question: How many job steps are necessary to implement a solution for the above.

2 Answers   TCS,


which is faster either static call or dynamic call ? and specify the reasons for it ? reply fast

1 Answers  


how will u code parm parameter and where pls ?

3 Answers   DELL,


What do you feel makes a good program?

2 Answers  


What is the maximum size of a 01 level item in COBOL I? in COBOL II?

2 Answers   IBM, RBS,


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

2 Answers  


01 A pic 9(100) find record length of it

6 Answers   TCS,


How to define variable 9(20) in COBOL, because compiler does not allow us to declare variables with Pic 9(18). Can anyone please let me know the answer... I know one answer to this question which is to use Compiler option Arith (Extend) during Compilation. It extends the maximum limit to 9(32)..Just wanted to know if there is any other way to extend this?

4 Answers   CSC, TCS,


Categories