There are two versions of my example depending on what I want to retrieve: The program name can be retrieved in a two steps by sending and receiving a program message. Unfortunately there is no equivalent of the Program Data Structure in CL. In RPG the program name is a subfield in the Program Data Structure so it can be easily retrieved, for an example see the post Externally described Data Structures. To overcome this I code the program name as a field in the file, and I always retrieve the name of the program from within the program itself. Many years ago I found that some of my colleagues would copy my display and printer file code without bothering to change the name of the program "hard coded" on the file. This is very useful when a user brings me a screen print or report I can quickly go to the program they have a question about. I have always had a standard that whatever output I produce from the IBM i I always put the program's name on it.
0 Comments
Leave a Reply. |