How can you add a particular field/coloumn in copybook?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly
What is an in-line perform ?
i have a file which contains records like 10,30,90,50,20,40,80,60,70 i want to display these records in reverse order like 70,60,80,40,20,50,90,30,10 please give me the cobol code (do not sort the records)
3 Answers Cap Gemini, Mind Tree,
Difference between next and continue clause
How to display the index.(displacement from an array)
How you can characterize tables in cobol?
How to increase the logical record length of existing PS file?
can we use variable picture clause as xx.99 in cobol.
What is the different between index and subscript?
Consider the following: 77 W-NUM PIC 9 VALUE 0 ------ MOVE 1 TO W-NUM PERFORM PARA-X UNTIL W-NUM > 9. ------ PARA-X ADD 1 TO W-NUM How many times PARA-X is executed ?
Name the divisions in a COBOL program ?
How to get the last record in vsam file in cluster? And how can you get the kids file records into your cobol program?