You can use the Display Program (DSPPGM) command to display the attributes of a program.
The information displayed or printed can be used to determine the options specified on the command used to create the program.
You can use the Display Program (DSPPGM) command to display the attributes of a program. To retrieve some of the attributes (such as program type, source member, text, creation date) into CL variables, you can use the Display Object Description (DSPOBJD) command to build an output file. The system can then read a CL procedure or program that uses the Declare File (DCLF) and Receive File (RCVF) commands. To access other attributes of the DSPPGM command (such as USRPRF), you can use the Retrieve program information (QCLRPGMI) API.