Using
A Display File in CL program.
I just designed one screen
which has one input capable field while rest is screen constant .
Have a look at below screenshot:
So this screen has one input
where you can enter any of the option.
Let us discuss how this is
being called with in a CL program.
In this program we do not
need to define opt variable as it will be picked from display file.
Let’s understand the code of
the program one by one.
First line PGM shows start
of the program.
2nd line DCLF –
it stands for declare file which has the screen name. (Basically it is used to
declare Display file, also the variables defined in this screen will be
accessible to this CL program).
3rd line SNDRCVF
--The Send/Receive File (SNDRCVF)
command is used by a control language (CL) program to send data to and receive
data from a device that is being used interactively by a user.
(Basically it handles
entering your response on screen and passes it to CL program).
4th and 5th
line has IF condition whatever condition will be true on screen expected output
will be processed as expected.
(like the above program has
either F3 pressed or you enter choice 1 as option, on pressing F3 it will close
the program and on taking option 1 it will call the program STMLE)
6th line is used
to tell the program ends here.