I need to pass data from SYSIN JCL to PL/I program. Below is my code from JCL and PL/I program and values are not being passed. Can anyone help please?
//SYSIN DD *
12345
PROG: PROC(INPARM) OPTIONS(MAIN REENTRANT) REORDER;
DCL INPARM CHAR(5) VARYING;
PUT SKIP LIST('INPARAM - '|| INPARM);
The PL/1 code you show does not read any file, it only consumes the PARM data. I assume by
mainframeyou mean IBM z/OS? On z/OS, PARM data is passed viaEXEC PGM=xyz,PARM=, and this data can be up to 100 characters. So, redefine theINPARMvariable asCHAR(100) VARYING.SYSINas shown is a data set definition; the program needs to define, open, and read a data set with ddname (file name) SYSIN. You also need to define an end-of-data flag, and define an ON condition that is triggered when all data from SYSIN has been read.Here is some code snippet: