Suppose you had a compiled CL program in your library. But somehow, the source of that CL program got deleted....
In such a situation, you can get your CL source back by means of RTVCLSRC command. This command uses the reference to object in your library to retrieve the CL source. In this command, you need to specify the name of CL program, the name of the database source file to which the CL source statements are written and, optionally, the name of the source file member.
Note: A CL source can be retrieved with RTVCLSRC command only when the program was created with the ALWRTVSRC(*YES) on the Create CL Program i.e. CRTCLPGM command. The default value of this field Allow retrieval of CL source ALWRTVSRC is *YES unless user changes it. Thus if a CL program is compiled with ALWRTVSRC as *NO on the Create CL Program i.e. CRTCLPGM command, RTVCLSRC command will not be able to retrieve the CL source. Thus, it is always advisable to keep the value of ALWRTVSRC as *YES (i.e. the default value) on CRTCLPGM command.
MORE INFORMATION ON THIS TOPIC
The Best Web Links: tips, tutorials and more.
Ask your programming questions--or help out your peers by answering them--in our live discussion forums.
Ask the Experts yourself: Our application development gurus are waiting to answer your programming questions.