Download Video Performer

Friday, September 20, 2013

IMS - User return code U0457

Code : U0457

Reasons for the error code can be as following:

- Issue with PSB processing.
-Same PSB is being used by two or more different programs/job at the same time.

Permanent fix:
- If abend is happening for jobs then add appropriate dependencies.
- Define PSB for parallel processing instead of serial processing.

Corrective action:

-Let other job/program complete which is using the PSB and then restart abended program/job.




Thursday, September 19, 2013

IMS - User return code U0102

Code : U0102

Reasons for the error code can be as following:

 - Issue with checkpoint restart logic coded in IMS program
- IMS log file from where program is picking up checkpoint info is not correct.

Permanent fix:
- Correct the checkpoint restart logic in the program
- Specify the correct log file in the job against IMSLOGR

Corrective action:

- Reset IMS checkpoint and restart the job with modified input file.





Wednesday, September 18, 2013

FTP - FTP the file on to the server with current date as suffix.

JCL code:

//STEP101 EXEC PGM=EZACFSM1
//SYSIN DD DSN=X.Y,DISP=SHR
//SYSOUT DD DSN=&&T,DISP=(,PASS),
//                        RECFM=FB,LRECL=80,BLKSIZE=0
//**
//STEP102 EXEC PGM=FTP
//OUTPUT DD SYSOUT=*
//INPUT DD DSN=&&T,DISP=(OLD,DELETE)
//*

- First step creates a temp FTP control card by passing current year, month and date (EZACFSM1 utility is used to pass the values.) and below is input for EZACFSM1 utility.

<Site address to FTP>
<id>
<pass>
CD /<destination library>
Txt
PUT ‘<sending dataset>’ ABCD_&YR4&MON&DAY..TXT
QUIT

- The destination file name will be like ABCD_20120327.TXT
- Second step FTP’s the data by using input control card.  

SORT- Sort file excluding header and trailer:

SORT code is given below:


//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=X.Y, DISP=SHR
//SORTOUT DD DSN=X1.Y1,DISP=SHR
//SYSIN DD*
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),
               IFTHEN=(WHEN=(1,4,CH,EQ,C'HDER'),OVERLAY=(81:C'0')),
               IFTHEN=(WHEN=(1,4,CH,EQ,C'TRAL'),OVERLAY=(81:C'9')),
               SORT FIELDS=(81,1,CH,A,1,06,CH,A)
               OUTREC FIELDS=(1,80)
/*


Sample Input file data is shown below:

The file contains the data with records having header and trailer

HDER
100400ABGD07A
8000000DFFI0KA
9000000NB0374A
7000000AS1240A
TRAL


Output of above job is as below:

HDER
100400ABGD07A
7000000AS1240A
8000000DFFI0KA 
9000000NB0374A
TRAL


 


SORT - Separate out duplicate records from a file:

SORT code is given below:

//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTIN DD DSN=X.Y, DISP=SHR
//SORTOUT DD DSN=X1.Y1,DISP=SHR
//SORTXSUM DD DSN=X2.Y2,DISP=SHR
//SYSIN DD*
  SORT FIELDS=(1,2,CH,A,13,11,CH,A)
  SUM FIELDS=NONE,XSUM
/*


- Duplicate records will be removed from the input file and will be written to SORTXSUM using sort utility.
 

SORT - Remove records from a file and update trailer count simultaneously:

SORT code is given below:

//STEP101 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SORTIN DD DSN=XXXX.YYYY,DISP=SHR
//SORTOUT DD DSN= X1.Y1,DISP=SHR
//SYSIN DD *
  SORT FIELDS=COPY
  OMIT COND=(1,9CH,EQ,C'2009MS06A')
      INREC IFTHEN=(WHEN=INIT
                                     OVERLAY=(221:SEQNUM,9,ZD)),
                   IFTHEN=(WHEN=(1,7,CH,EQ,C'TRAILER'),
                                     OVERLAY=(8:221,9,ZD,SUB,+2,TO=PD,LENGTH=5))
                   OUTREC FIELDS=(1,220)
END
/*


- In above job records will be deleted based on the value ‘2009MS06A’ and trailer will be updated simultaneously with the current record count available in packed decimal format after deletion. 
 - The trailer count can be updated either in ZD/PD format depending upon the sort control card.

SORT - Runtime comparison of the header date in file with current date


           Below is the SORT code
   
//STEP001 EXEC PGM=SORT,PARM='CENTWIN=80,NULLOUT=RC4'
//SORTIN DD DSN=XXXX.YYYY,SISP=SHR
//SORTOUT DD SYSOUT=*
// SYSOUT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//SYSIN DD*
  INREC FIELDS=(10,2,13,2,16,2)
  SORT FIELDS=COPY,STOPAFT=1
  OUTFIL INCLUDE=(1,6,Y2T,EQ,Y'DATE1')
/*

Sample Input file data is shown below

00HEADER 09/04/01  120009
01ABCD

- The date is  displayed in spool if the date matches, otherwise it throws maxcc 4 with blank spool
- Date formats can be changed as per requirement based on the parms like Y2T and DATE1.
              
             Output of above job is shown below
            
            090401



Tuesday, September 17, 2013

SORT - Run time compare between record count in the trailer record and total record count in file

SORT code:

//STEP001 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=XXXX.YYYY,DISP=SHR
//SORTOUT DD SYSOUT=*
//SYSIN DD *
  OPTION COPY
  INREC BUILD=(1,26,SEQNUM,10,ZD,START=0)
  OUTFIL FNAMES=OUT,NULLOFL=RC4,
  INCLUDE=(1,4,CH,EQ,C'1TRL',AND,(11,10,ZD,EQ,27,10,ZD))
/*


·  The above job will compare the record count specified in the trailer and the actual record count in the file. 
·  After comparison it  provides the result in the spool like following if the counts are matching: 
·  If the counts are not matching job will throw RC=0004 

Output which can be seen in spool:
1TRL0409010000000140               0000000140