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 |
01 WS-NAME PIC X(10) OCCURES 2. by this we can get ws-name 2 times. My qustion is how can we access the second name
Why we are using comp and comp-3 in real time projects?
If i got a job on mainframe technology, will i have a bright future?. Some people are discouraging me. Let me know, is it true? Please bring back me from the confusion.
What are the divisions in a cobol program? Which one is the mandatory division among them?
i have n records in one file and in this file there is some fields and i want to count that how many sharma in my file so plz give the coding that how we read sharma ?
What will happen if you code GO BACK instead of STOP RUN in a stand-alone COBOL program i.e. a program which is not calling any other program ?
Explain Restart Logic in Cobol?
when SE37 SB37 and sd37 occurs how to increase the volume , primary quantity and secondary quantity?
what are the utilities for load and unload the DB2 tables
What will happen if we move SPACES to numeric field and ZEROES to alphabetic field?
How to declare if emp-name = AAAAA""BBB in working-storage section. After display emp-name should print like AAAAA""BB
) How do u handle errors in BMS macro