Skip to Content
Custom Search

If the VSAM is empty then copy job abends

 

If the VSAM is empty then copy job abends
 
 
There may be a situation where you have to copy a VSAM file
to a flat file and if the VSAM file for some reason is empty then 
the sort copy job abends with abend code of U0016.
 
Please refer the following JCL
 
//STEP001 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=VSAM.DSN,DISP=SHR
//SORTOUT DD DSN=FLATFILE.DSN,
//  DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
/*
 
 
You can bypass this abend by specifying the VSAMEMT=YES parameter with 
SORT 
 
Here is an example of the situation
 
 
//STEP001 EXEC PGM=SORT,PARM=’VSAMEMT=YES’
//*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=VSAM.DSN,DISP=SHR
//SORTOUT DD DSN=FLATFILE.DSN,
//  DISP=(NEW,CATLG,DELETE)
//SYSIN DD *
SORT FIELDS=COPY
/*

Comments

If the VSAM is empty then copy job abends

thanks for this..really helpful

Post new comment

  • Allowed HTML tags: <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 0 users and 23 guests online.
Dr. Radut | page