Reputation: 79
I am working on a basic JCL script from the IBM publib.boulder site. Below is the JCL that simply sorts a list of characters in ascending order. The job executes just fine, but the contents of SYSIN are not printed to the job status, as is shown in the publib demonstration
Here is my code:
//SORT JOB OTIMPF01,CLASS=A,MSGCLASS=H
/*
//STEP1 EXEC PGM=SORT
//SYSIN DD * SORT FIELDS=(1,75,CH,A)
/*
//SYSOUT DD SYSOUT=*
//SYSIN DD *
NEPTUNE
PLUTO
EARTH
VENUS
MERCURY
MARS
URANUS
SATURN
JUPITER
/*
//SORTOUT DD SYSOUT=*
/*
I know that it has something to do with the MSGCLASS= statement. The sample code from publib uses MSGCLASS=H, and I was told that that is different depending on who set the option on the mainframe. My question is, how can I figure out what my mainframe's MSGCLASS is set to without having to ask anyone? Again, I just want the result of the characters sorted in ascending order to be displayed in the job status.
It should look like this...
ICE134I 0 NUMBER OF BYTES SORTED: 720
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 0 END OF DFSORT
EARTH
JUPITER
MARS
MERCURY
NEPTUNE
PLUTO
SATURN
URANUS
VENUS
...Only my job status read-out does not display the characters Earth through Venus in the output of the job status.
My job status looks like this...
IEF373I STEP/STEP1 /START 2014002.1033
IEF374I STEP/STEP1 /STOP 2014002.1033 CPU 0MIN 00.00SEC SRB 0MIN 00.00SEC VIRT 212K SYS 248K EXT 8K SYS 11592K
IEF375I JOB/SORT /START 2014002.1033
IEF376I JOB/SORT /STOP 2014002.1033 CPU 0MIN 00.00SEC SRB 0MIN 00.00SEC
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 10:33 ON THU JAN 02, 2014 -
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT
ICE751I 0 C5-K05352 C6-Q95214 E7-K90000
ICE052I 3 END OF DFSORT
I imagine it has to do with properly setting the MSGCLASS. I have tried Googling z/OS MSGCLASS and to no surprise, it comes up with very little.
Upvotes: 1
Views: 3618
Reputation: 13076
Indeed, you have uncovered a documentation error in the manual page you link to. However, you have also introduced an error of your own.
For your Mainframe installed SORT package (likely to be IBM's DFSORT or the competing SyncSort, but also possible the further rival CA-SORT):
//SYSIN DD whatever
Is where you put the control cards.
In the above, whatever can be *, DATA or parameters for an actual dataset.
The DDNAME for input to the SORT program you use is SORTIN:
//SORTIN DD whatever (same as above)
You accidentally made that SYSIN as well. It should be:
//SYSIN DD *
NEPTUNE
PLUTO
EARTH
VENUS
MERCURY
MARS
URANUS
SATURN
JUPITER
You should then see the output from the example in your SORTOUT spool file.
There are other DDs for when you do other things with SORT (like MERGE, JOINKEYS, OUTFIL) which can or do use differently-named DDs. It is also possible to override the standard names, but you would not be able to override them to SYSIN.
//SYSIN DD * is a bit like STDIN, but don't get carried away with the comparison. By convention, many Mainframe utilities use SYSIN for input. If a JCL-stream contains "cards" not preceded by a DDName, then a DDName of SYSIN will be automatically generated. COBOL has an ACCEPT verb for a type of input, and the default DD for this is SYSIN. However, simply including a SYSIN in the JCL for a step is no guarantee that it will be used. If the program on the EXEC does not use SYSIN, then simply including SYSIN is not going to cause data to be read from there.
Upvotes: 1
Reputation: 9569
The key problem is ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT
. Assuming you transcribed your JCL correctly here, you typed:
//SYSIN DD * SORT FIELDS=(1,75,CH,A)
/*
In which case, you presented an empty input stream to SORT
, because the SORT FIELDS=(1,75,CH,A)
was treated as a comment on the DD
statement.
You should have typed:
//SYSIN DD *
SORT FIELDS=(1,75,CH,A)
/*
Upvotes: 4
Reputation: 841
Try ST jobname in SDSF and it will show you all the output. ST is the status of jobs and shows all the output for all jobs on the system submitted or finished.
Also if you are looking on the held queue H jobname then see what output classes for you job it shows and try changing the msgclass to one of the classes shown on the held queue. For example on my system I can see class X and H on the held queue but only see class A when I use the ST command
Upvotes: 1