How to use period in PARM parameters (JCL)?

2019-09-02 03:12发布

问题:

The situation is the following. I have PARM parameters:

CSQ1            - Queue manager name
CARD.PAYMENTS   - Request queue name
CCD3050.REPLY   - Reply queue name
CCD3050         - Contestant user ID
400.05          - Payment amount
"MY PAYMENT"    - Payment description

In my JCL I wrote this so:

//PAYMENT  EXEC PGM=PAYMENT,REGION=1024K,                               
//             PARM='CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,          
//             400.05,"MY PAYMENT"'

I had a trouble. I wrote:

//             PARM=('CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050',
//             '400.05,MY PAYMENT')

And had a trouble too. Then I wrote:

PARM=(CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,400.05,MY PAYMENT)
  • and!!! had this: 2 IEFC624I INCORRECT USE OF PERIOD IN THE PARM FIELD What does it mean? AND HOW IS CORRECT TO USE PERIODS IN JCL? I haven't found this info anywhere... Help please!

回答1:

If you have ., =, , ' ( ) (there may be more, I'm not trying to be exhastive) as part of the value of the PARM, then you need to ensure they don't get interpreted by the converter/interpreter.

You do this by bounding things with single quotes, or parenthesis, or you can have combinations of those, but if your PARM values contain such things you have to protect them (as you would escape something in other OSs, languages).

Here is a link a JCL Language Reference. You can follow the links inside the page to completely explore the manual, or download a PDF of it. http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/iea2b690/16.8.1?SHELF=&DT=20090526233806&CASE=

On another question of yours I have already shown you a PARM that can contain all those values.

// PARM=('CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,400.05,MY PAYMENT')

or

//  PARM='CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,400.05,MY PAYMENT'

Will work, as far as the JCL is concerned.

You can protect the .s in many different ways.

Those PARMs both fit on one line. They will be difficult to maintain. Put them in parenthesis, one element per line:

// PARM=(CSQ1,
//       'CARD.PAYMENTS',
//       'CCD3050.REPLY',
//       CCD3050,
//       '400.05',
//       'MY PAYMENT')