-1
//BJCL1804 JOB 1,NOTIFY=&SYSUID
//SORT01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DISP,SHR,DSN=ZOS.PUBLIC.DATA(ASCII)
//SORTOUT DD SYSOUT=*
//SYSIN DD SYSIN=*
//SORT DD =(1,1,CH,A)

I am trying to use this JCL code and when I use the SUB command, I always get an error. Even after hours of trying and trying, I cannot seem to fix this error. I looked up the error codes from the =SD and I cannot figure out how to fix the issue. The syntax seems to be correct. I just don't understand. Can someone please help me understand why this is causing an error to occur?

  • I actually fixed my code to an extent. I now only get 1 error. The error is for the last line. I get the error "IEFC641I" –  Oct 07 '14 at 01:01
  • IEFC641I Improper subparameter list on the dd statement –  Oct 07 '14 at 01:03

3 Answers3

1

You have two things wrong with this:

//SORTIN DD DISP,SHR,DSN=ZOS.PUBLIC.DATA(ASCII)

This should be "DISP=SHR", not "DISP,SHR"

//SYSIN DD SYSIN=*
//SORT DD =(1,1,CH,A)

This should be:

//SYSIN DD SYSIN=*
SORT FIELDS=(1,1,CH,A)

The SYSIN=* is creating an instream temporary dataset with the sort control statements. Also, I think you need something like "SORT FIELDS=(1,1,CH,A)".

Joe Zitzelberger
  • 4,238
  • 2
  • 28
  • 42
0
//SYSIN DD SYSIN=*

is incorrect syntax. I believe you want

//SYSIN DD *

and SORT control statements don't begin with //, which is what is causing your IEFC641I error.

The documentation is your friend.

cschneid
  • 10,237
  • 1
  • 28
  • 39
  • I corrected what you told me to do. Now... I can an IEFC654I Substitution JCL Error for Line 1 and when I omit the // for the sort on line 9, it seems to work but I am not sure if it actually does. –  Oct 07 '14 at 01:13
0
//BJCL1804 JOB 1,NOTIFY=&SYSUID
//SORT01 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SORTIN DD DISP,SHR,DSN=ZOS.PUBLIC.DATA(ASCII)
//SORTOUT DD SYSOUT=*
//SYSIN DD SYSIN=*
//SORT DD =(1,1,CH,A)

The format of your JOB statement should be the same as that for other developers at your site. That "1," looks wrong, but since knowing for sure won't help, I'm not going to check. The JCL Reference will tell you.

The SYSPRINT and SYSUDUMP you do not need for a SORT step, although perhaps you are supposed to have them at your site, even though pointless.

As has been pointed out, your SYSIN DD is incorrect. You can't just follow the format of a different type of DD statement and hope for the best. it should be:

//SYSIND DD *

Where the * means "instream data" rather than a named dataset.

Sort Control Cards do not start with // and do start with at least one blank.

If you are trying to sort a file, it will look something like this:

 SORT FIELDS=(1,1,CH,A)
Bill Woodger
  • 12,968
  • 4
  • 38
  • 47