PARM值未按预期解释

时间:2014-02-05 13:26:08

标签: zos jcl

在z / os主机中工作,我有以下情况

1)这是我的JCL,我已提交:

 //PAYMENT JOB MSGCLASS=H                                                
 //******************************************************************    
 //*                                                                     
 //* This job can be used to run an MQ application that                  
 //* communicates with a transaction running in a CICS region.           
 //* The CICS transaction records a credit card payment in DB2.                                                                            
 //* The payment description has a maximum length of 35 characters.      
 //* It is enclosed within quotes below so that you may include          
 //* spaces to separate words.                                                                                                               
 //* The monetary values allowed by this tool must be within the         
 //* range 0.01 - 9999.99.                                                         
 //*                                                                     
 //******************************************************************    
 //PAYMENT  EXEC PGM=PAYMENT,REGION=1024K,                               
 //             PARM='CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,          
 //             400.05,"MY PAYMENT"'                                            
 //STEPLIB  DD DSN=CCD3050.PART2.LOAD,DISP=SHR    
 //         DD DSN=WMQ.V6R0.SCSQLOAD,DISP=SHR                            
 //         DD DSN=WMQ.V6R0.SCSQANLE,DISP=SHR                            
 //         DD DSN=WMQ.V6R0.SCSQAUTH,DISP=SHR                            
 //STDOUT   DD SYSOUT=*                                                  
 //STDERR   DD SYSOUT=*                                                  
 //SYSPRINT DD SYSOUT=* 

2)查看SDSF中的工作输出,我看到:

 IRR010I  USERID CCD3050  IS ASSIGNED TO THIS JOB.           
$HASP373 PAYMENT  STARTED - INIT 1    - CLASS A - SYS MVST  
IEF403I PAYMENT - STARTED - TIME=12.06.31                   
-                                         --TIMINGS (MINS.)-
-JOBNAME  STEPNAME PROCSTEP    RC   EXCP    CPU    SRB  CLOCK   SERV  PG   PAGE   SWAP    VIO SWAPS STEPNO 
-PAYMENT           PAYMENT     01     39    .00    .00    .00    122   0      0      0      0     0     1  
IEF404I PAYMENT - ENDED - TIME=12.06.31                     
-PAYMENT  ENDED.  NAME-                     TOTAL CPU TIME=   .00  TOTAL ELAPSED TIME=   .00
$HASP395 PAYMENT  ENDED  
0------ JES2 JOB STATISTICS ------ 
-  01 FEB 2014 JOB EXECUTION DATE  
-           55 CARDS READ    
-          111 SYSOUT PRINT RECORDS                                            
-            0 SYSOUT PUNCH RECORDS                                            
-            6 SYSOUT SPOOL KBYTES                                             
-         0.00 MINUTES EXECUTION TIME                                          
         1 //PAYMENT JOB MSGCLASS=H                                            
           //******************************************************************
           //*                                                                     
           //* This job can be used to run an MQ application that                  
           //* communicates with a transaction running in a CICS region.           
           //* The CICS transaction records a credit card payment in DB2.                                                                            
           //* The payment description has a maximum length of 35 characters.      
           //* It is enclosed within quotes below so that you may include          
           //* spaces to separate words.                                                                                                               
           //* The monetary values allowed by this tool must be within the         
           //* range 0.01 - 9999.99.                                                         
           //*                                                                     
           //******************************************************************    
         2 //PAYMENT  EXEC PGM=PAYMENT,REGION=1024K,                               
           //             PARM='CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,          
           //             400.05,"MY PAYMENT"'                                            
         3 //STEPLIB  DD DSN=CCD3050.PART2.LOAD,DISP=SHR    
         4 //         DD DSN=WMQ.V6R0.SCSQLOAD,DISP=SHR                            
         5 //         DD DSN=WMQ.V6R0.SCSQANLE,DISP=SHR                            
         6 //         DD DSN=WMQ.V6R0.SCSQAUTH,DISP=SHR                            
         7 //STDOUT   DD SYSOUT=*                                                  
         8 //STDERR   DD SYSOUT=*                                                  
         9 //SYSPRINT DD SYSOUT=*      
 ICH70001I CCD3050  LAST ACCESS AT 15:55:39 ON WEDNESDAY, JANUARY 29, 2014 
 IEF236I ALLOC. FOR PAYMENT PAYMENT                                        
 IGD103I SMS ALLOCATED TO DDNAME STEPLIB                                   
 IGD103I SMS ALLOCATED TO DDNAME                                           
 IGD103I SMS ALLOCATED TO DDNAME                                           
 IGD103I SMS ALLOCATED TO DDNAME                                           
 IEF237I JES2 ALLOCATED TO STDOUT                                          
 IEF237I JES2 ALLOCATED TO STDERR                                          
 IEF237I JES2 ALLOCATED TO SYSPRINT                                        
 IEF142I PAYMENT PAYMENT - STEP WAS EXECUTED - COND CODE 0001                   
 IGD104I CCD3050.PART2.LOAD                           RETAINED,  DDNAME=STEPLIB 
 IGD104I WMQ.V6R0.SCSQLOAD                            RETAINED,  DDNAME=        
 IGD104I WMQ.V6R0.SCSQANLE                            RETAINED,  DDNAME=        
 IGD104I WMQ.V6R0.SCSQAUTH                            RETAINED,  DDNAME=        
 IEF285I   CCD3050.PAYMENT.JOB03520.D0000101.?          SYSOUT                  
 IEF285I   CCD3050.PAYMENT.JOB03520.D0000102.?          SYSOUT                  
 IEF285I   CCD3050.PAYMENT.JOB03520.D0000103.?          SYSOUT                  
 IEF373I STEP/PAYMENT /START 2014036.1206 
 IEF374I STEP/PAYMENT /STOP  2014036.1206 CPU    0MIN 00.00SEC SRB    0MIN 00.00SEC VIRT    16K SYS   320K EXT     280K SYS   11012K 
 IEF375I  JOB/PAYMENT /START 2014036.1206                                       
 IEF376I  JOB/PAYMENT /STOP  2014036.1206 CPU    0MIN 00.00SEC SRB    0MIN 00.00SEC 

3)然后我看到这些消息:

********************************************************                        
Credit card payment unit test tool                        
********************************************************                        

Incorrect usage!                                                                

Program Usage                                                                   
-------------                                                                   

PAYMENT <queue manager> <cics request queue> <reply queue> <userid> <payment value> <payment description>

The payment description has a maximum length of 35 characters.                  

The monetary value must be within the range 0.01 - 9999.99.   

我做错了什么?

1 个答案:

答案 0 :(得分:2)

你正在使用的程序对你毫无帮助。接收PARM的所有程序都显示已传递给它们的值,这是一种很好的做法。

使用PARM完全按照您的指定编译并执行此程序:

   ID DIVISION. 
   PROGRAM-ID. PROGNAME. 
   ENVIRONMENT DIVISION. 
   DATA DIVISION. 
   WORKING-STORAGE SECTION. 
   01  W-WHEN-COMPILED              PIC X(8)BX(8). 
   LINKAGE SECTION. 
   01  THE-PARM-FROM-THE-JCL. 
       05  TPFTJ-LENGTH             BINARY PIC 9(4). 
       05  TPFTJ-VALUE. 
           10  FILLER OCCURS 0 TO 100 TIMES 
               DEPENDING ON TPFTJ-LENGTH. 
               15  FILLER           PIC X. 
   PROCEDURE DIVISION USING 
                                    THE-PARM-FROM-THE-JCL
                                    . 
       MOVE WHEN-COMPILED           TO W-WHEN-COMPILED 
       DISPLAY "PROGNAME " W-WHEN-COMPILED 
       DISPLAY 
              ">" 
              TPFTJ-VALUE 
              "<" 
       GOBACK 
       . 

您应该将此视为输出:

PROGNAME followed by date-and-time-of-compile                                               
>CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,         400.05,"MY PAYMENT"<

你会看到中间有一大块空白。那是你的问题。

我不知道你是否真的想在我的付款周围使用双引号。

假设没有,这将是一种方式来编码您的PARM:

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

上述程序会显示此值:

>CSQ1,CARD.PAYMENTS,CCD3050.REPLY,CCD3050,400.05,MY PAYMENT<

如果你看一下,你会看到问题和描述的一些决议:http://publib.boulder.ibm.com/infocenter/zvm/v5r4/index.jsp?topic=/com.ibm.zos.r9.ieab100/jclexs.htm。此示例适用于活页夹(IEWL)。您还应该查阅特定版本的z / OS的JCL参考手册(尽管任何人都应该这样做,我认为在z / OS下PARM处理没有改变)。

PARM的延续是棘手的,因为某些字符对JCL有意义。一种继续的方法是使用最多第71列,然后继续第16列。这不是很灵活。将PARM值括在括号中更灵活。您还有几个完整的止损/期间,这些值需要由单引号对保护。 JCL参考将详细介绍所有,然后您将尝试上述程序以实现完全清晰。