0
votes

I have a sequential dataset has the form of this

0000000520161103152815SHE0009 P1234561234567898765411112222        120AA

The last 2 bytes (position 71 and 72) are separate CH of either AA, AB, BA or blank. I'm trying to sort this input and create a report of sections AA, AB, BA and ignore the record that doesn't have AA, AB or BA. Each row of each section shows the teller name (SHE0009 above, position 23), and the payment (120 above, 11 bytes before AA, position 60). The final line of each section sum all the payments from that section.

enter image description here

Here's my code

 //SHE0008 JOB                                                          
 //SORTSTEP EXEC PGM=SORT                                               
 //SYSOUT   DD SYSOUT=*                                                 
 //SYSPRINT DD SYSOUT=*                                                 
 //SORTIN   DD DSN='SHECISC.ZEUSBANK.TXNOFFLD',DISP=SHR                 
 //SORTOUT  DD DSN=SHE0008.TESTT,                                       
 //          DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(10,5),RLSE)            
 //SYSIN  DD *                                                          
   SORT FIELDS=(71,1,CH,A,72,1,CH.A)                                    
   INREC BUILD=(71,1,72,1,23,8,60,11,BI,TO=ZD,LENGTH=11)                
   OUTFIL REMOVECC,                                                     
          SECTIONS=(1,1,2,1                                             
          HEADER3=(1:C'PAYMENTS BY TELLER',/,X,/,                       
                   1:C'TRANSFER TYPE:    ',1,1,2,1,/,X,/,               
                   1:C'TELLER',10:C'PAYMENT',/,                         
                   1:C'------',10:C'-------'),                          
          TRAILER3=(X,/,                                                
     1:C'BRANCH TOTAL: ',16:TOT=(11,11,BI,EDIT=(SIIIITTT),SIGNS=(,-)))),
          TRAILER1=(X,/,1:C'GRAND TOTAL: ',TOT=(11,11,BI,               
                         EDIT=(SIIIITTT),SIGNS=(,-))),                  
         OUTREC=(1:7,4,CH,LENGTH=7,10:11,4,BI,EDIT=(SIIIITTT),          
                         SIGNS=(,-))                                    
 /*                                                                     

I'm getting error SORTIN - DATA SET SHECISC.ZEUSBANK.TXNOFFLD NOT FOUNDI - STEP WAS NOT EXECUTED. Can anyone see why my dataset cannot be found and if possible is this the code that makes my desired result. Thanks.

2

2 Answers

1
votes

The file name is SHECICS.ZEUSBANK.TXNOFFLD you wrote SHECISC.ZEUSBANK.TXNOFFLD.

You misspelt the first part "SHECICS" that could be the problem.

0
votes

Try removing the quotes around the dataset name.

i.e. change

//SORTIN   DD DSN='SHECISC.ZEUSBANK.TXNOFFLD',DISP=SHR

to

//SORTIN   DD DSN=SHECISC.ZEUSBANK.TXNOFFLD,DISP=SHR

The reasoning being :-

If quotation marks delimit a data set name in a JCL DD statement, JCL processing cannot perform syntax checking on the statement, and SMS rejects the input based on its parsing of the data set name. SMS does not allow the name to be catalogued because quoted data sets cannot be SMS managed.

SMS being System Managed Storage, although I believe that the result would have been the same in pre-SMS times. If I recall correctly I also had the odd tape created with DSN=' ', (a number of spaces) which would fool quite a few people if they tried to read the tape i.e. quotes allowed you to use con-conformant dataset names.

The following my be of interest:-

Data Set Names

Character sets - Table 2. Special Characters Used in Syntax