What JCL to run a PL / I menu?



IBM's cross-platform compiler PL/I for MVS, VM & VSE, OS/390 and Enterprise PL/I for z/OS

What JCL to run a PL / I menu?

Postby michel123 » Sat Mar 14, 2015 11:17 pm

Hello, on the internet I found the following code to display a menu and answer (Options 1, 2, 3 or 4):

/ * PROGRAM MENU TO CALL DIFF. PROGRAMS * /
MENUPROGRAM: PROC OPTIONS (MAIN);
DCL RDPROGRAM EXT ENTRY;
DCL WRPROGRAM EXT ENTRY;
DCL MODPROGRAM EXT ENTRY;
DCL CH CHAR (1);
PUT SKIP LIST ('MENU');
PUT SKIP LIST ('1. ADD TO RECORD A');
PUT SKIP LIST ('2. TO READ A RECORD');
PUT SKIP LIST ('3. TO MODIFY RECORD A');
PUT SKIP LIST ('4. EXIT');
PUT SKIP (2) LIST ('ENTER YOUR CHOICE (1-4):');
GET LIST (CH);
IF CH = '1' THEN
CALL WRPROGRAM;
ELSE
IF CH = '2' THEN
CALL RDPROGRAM;
ELSE
IF CH = '3' THEN
CALL MODPROGRAM;
ELSE
IF CH = '4' THEN
RETURN;
ELSE
PUT LIST ('WRONG CHOICE');
END MENUPROGRAM;

How to write the associated JCL?

Thank you.
michel123
 
Posts: 58
Joined: Tue Dec 28, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: What JCL to run a PL / I menu?

Postby enrico-sorichetti » Sun Mar 15, 2015 1:13 am

unfortunately Your program is designed for a batch environment so
You will have to forget about the MENU thingy
PUT LIST will write to the ddname SYSPRINT
and the GET LIST will read from the ddname SYSIN
most probably, because of buffering You will not see the menu

so not much ( NO ) interactivity :mrgreen:

everything will be done reading and writing to traditional ddnames

You will have to provide in the SYSIN DD the option chosen
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: What JCL to run a PL / I menu?

Postby michel123 » Sun Mar 15, 2015 2:10 am

Hello and thank you for your long and precise answer.

I will resign myself to put everything in the SYSIN with my choice.

best regards.
michel123
 
Posts: 58
Joined: Tue Dec 28, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time

Re: What JCL to run a PL / I menu?

Postby prino » Sun Mar 15, 2015 5:27 am

michel123 wrote:Hello and thank you for your long and precise answer.

I will resign myself to put everything in the SYSIN with my choice.

Michel,

Contact me, assuming you're the same, privately on that other forum, I've got a PL/I program that actually interfaces ISPF, the program won't run any more (it needs DB2), but it should give you some clues as how to make PL/I and ISPF work together.

Robert
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy
User avatar
prino
 
Posts: 635
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 28 times

Re: What JCL to run a PL / I menu?

Postby michel123 » Sun Mar 15, 2015 9:45 pm

Hello Robert,

I answered in your private box.
michel123
 
Posts: 58
Joined: Tue Dec 28, 2010 12:28 am
Has thanked: 0 time
Been thanked: 0 time


Return to PL/I