MCH3601 Error occurs on RPTNUM command
From Support
| | If you have a question or seek clarification, please call Technical Support. |
Problem:
The exact message is something like this: Function check. MCH3601 unmonitored by RPTNUMC at statement 4500, instruction X'0024'.
The customer was using the RPTNUM command to retrieve spool file information from their own CL program.
Solution:
You must return ALL variables when using the RPTNUM command. If you omit any of the variables you will receive the MCH3601 error.
Listed below is a sample CL program to use as a guide when creating processes that utilize the RPTNUM command:
PGM
/******************************************************/ /* Declare Spool File Retrieval Variables */ /******************************************************/
DCL VAR(&NEWSPOOL) TYPE(*CHAR) LEN(10)
DCL VAR(&NEWJOB) TYPE(*CHAR) LEN(10)
DCL VAR(&NEWUSER) TYPE(*CHAR) LEN(10)
DCL VAR(&NEWNBR) TYPE(*CHAR) LEN(6)
DCL VAR(&NEWSPNM) TYPE(*CHAR) LEN(4)
/******************************************************/ /* Run Report Program */ /******************************************************/
CALL PGM(RPT100)
/******************************************************/ /* RETREIVE SPOOL ATTRIBUTES FROM NEW SPOOL FILE */ /* TO GET THE ACTUAL PAGE COUNT ON THE NEW FILE */ /******************************************************/
RPTNUM SPLF(RPT100P) JOB(*) SPLNBR(*LAST)
RTNSPLF(&NEWSPOOL) RTNJOBNAME(&NE
RTNJOBUSER(&NEWUSER) RTNJOBNUM(&N
RTNSPLNUM(&NEWSPNM)
/******************************************************/ /* SPLIT REPORT BASED ON SPOOL FILE VALUES */ /******************************************************/
RPTSPLIT FILE(&NEWSPOOL) +
JOB(&NEWNBR/&NEWUSER/&NEWJOB) +
SPLNBR(&NEWSPNM) BEGCMP(*ALL) +
OUTQ(QGPL/QPRINT)
ENDPGM
