Page 1 of 2

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 10:13 pm
by Gallium
I am brand new to JCL and am just trying to understand the difference between SYSIN and SORTIN and SYSOUT and SORTOUT. The documentation says that SYS is to do with program messages and control statements, however I am unsure what this means. It says that SORT is to do with input and output data sets?

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 10:49 pm
by Terry Heinze
You seem to have it right. Here's an example of a step to copy a data set:
//COPY    EXEC PGM=SORT
//SYSOUT   DD  SYSOUT=*
//SORTIN   DD  DSN=hlq.xxxxxxx.PAYMENTS(0),
//             DISP=SHR
//SORTOUT  DD  DSN=hlq.yyyyyyy.PAYMENTS.G0275,
//             DISP=(NEW,CATLG,DELETE),
//             LRECL=308,
//             RECFM=FB,
//             SPACE=(TRK,(1,1),RLSE),
//             UNIT=DISK
//SYSIN    DD  *
       OPTION  COPY

SYSOUT: where the printed output goes
SORTIN: the input data set
SORTOUT: the output data set
SYSIN: the control cards to tell SORT what you want to do

Re: Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 11:02 pm
by Gallium
Thank you for that. Why does SYSIN have just a * after DD? Also, is generating a report from a dataset the same process? Because that is what I want to do.

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 11:09 pm
by Terry Heinze
The * tells JCL that the control statements are inline instead of inside a data set.
For a formatted report, you'll want to specify statements to make it look the way you want it. If all you want is a printed report of the input data set, I'd use IEBGENER instead.

Re: Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 11:30 pm
by BillyBoyo
SORT has many functions and handy things for reports :-)

Re: Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 11:31 pm
by Gallium
I'm still a little confused as to what a control statement actually is? The report does need to be formatted because one of the numbers in the different records of the data set is a 4 byte unsigned binary which needs to be displayed as 6 digits with zeroes in front if necessary.

Re: Re: Difference between SYS and SORT in IN and OUT

PostPosted: Tue Nov 25, 2014 11:39 pm
by Gallium
BillyBoyo wrote:SORT has many functions and handy things for reports :-)


But SORT is different from ICETOOL?

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Wed Nov 26, 2014 12:09 am
by Terry Heinze
SORT is a generic term. Your initial post should probably been posted in the DFSORT/ICETOOL/ICEGENER section or the Syncsort/Synctool section depending on which product you have. They are similar but competing products.

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Wed Nov 26, 2014 12:17 am
by Gallium
Terry Heinze wrote:SORT is a generic term. Your initial post should probably been posted in the DFSORT/ICETOOL/ICEGENER section or the Syncsort/Synctool section depending on which product you have. They are similar but competing products.


Are you familiar with ICETOOL though?

Re: Difference between SYS and SORT in IN and OUT

PostPosted: Wed Nov 26, 2014 2:01 am
by Terry Heinze
ICETOOL is explained in the DFSORT: Getting Started Manual that you are currently reading as indicated in the DFSORT section of this bulletin board.