![]() Hence, for example, the file record length (maximum length for a variable length file) is REQUIRED to be known at compile time - you cannot read a file of arbitrary length since the compile sets the length (or maximum length), not the execution of the program. ![]() Source changes of any sort cannot be done at execution time - only at compile time. If you are not clear on the difference between the compile and the execution, you MUST first understand this before you go any further. It is not necessarily easy, but it can be done. ![]() If you are wanting to write your application such that the COBOL program gets the copy book, then the COBOL program is compiled with the source changes, and then that program is executed as a different step of the job or a new job, then yes that can be done. An executing program cannot be recompiled "on-the-fly" to use a different copy book. COBOL is a compiled language and all copy layouts, file layouts, and data records MUST be known at compile time. If you expect a COBOL program to be passed a copy layout and be able to use that layout while executing to read the file - this cannot be done, period. If we recieve the copybook name in variable 'WS-COPY" in COBOL code and wite COPY 'WS-COPY' to include this copybook in the program, will COBOL accept this?It really depends upon what you are wanting to do.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |