Microsoft Azure Fundamentals AZ-900 Exam Practice Test

Microsoft Azure Fundamental AZ-900 Topic: Describe Cloud Concepts (20-25%) Describe Core Azure Services (15-20%) Describe core solutions and...

What is the use of PGM and ENDPGM in CL program

PGM and ENDPGM in CL program:
 
In this blog post, we will see what is the use of PGM and ENDPGM commands in a CL program. First, we will start with the PGM command.
 
PGM Command:
  • In general, the PGM command is written to identify the beginning of a CL program.
  • Example:
PGM Command
  • It is an optional command but becomes mandatory only when we are receiving parameters from external programs.
  • It is mandatory to specify the parameter in the PGM command if the program accepts input parameters.
  • Example:
    •  In the below program, we are accepting 2 parameters from the calling program. So it is a must to specify in the PGM command.
Parameters in PGM command
    • Here &name and &age are parameters from the calling program.
ENDPGM Command
  • ENDPGM is written to identify the end of a CL program.
  • This is also an optional command. 
  • Example:
ENDPGM command

No comments:

Post a Comment