Page 3 of 3

Re: JCL to add or remove a line in PDS member

PostPosted: Mon Dec 19, 2016 8:57 pm
by dhana venkatesh
Just got one example in google. Will this comes under DFSORT? Will the below satisfy my requirement, ie, remove a line in a member ? . Also want to know the meaning of the strings which is used inside OMIT COND=(34,2,CH,EQ,C'AB'), what is (34,2,CH,EQ,C'AB') ?

//SETP001  EXEC PGM=SORT                                        
//SYSPRINT DD SYSOUT=*                                          
//SYSOUT   DD SYSOUT=*                                          
//SYSUDUMP DD SYSOUT=*                                          
//REPORT1  DD SYSOUT=*                                          
//SORTIN   DD DISP=SHR,DSN=USERID.ABC.INPFILE,
//SORTOUT  DD DSN=USERID.ABC.OUTFILE,
//      DISP=(,CATLG),                                          
//      SPACE=(TRK,(30,10),RLSE),                                
//      UNIT=SYSDA,                                              
//      DCB=(RECFM=FB,LRECL=80,BLKSIZE=0,DSORG=PS)              
//SORTWK01 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)                
//SORTWK02 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)    
//SORTWK03 DD  UNIT=DISK,SPACE=(CYL,(20,5),RLSE)    
//SYSIN    DD *                                      
SORT FIELDS=COPY                                        
OMIT COND=((34,2,CH,EQ,C'AB'),AND,(74,1,CH,EQ,C' '))
/*                                                  
//*


Coded, BTW

Re: JCL to add or remove a line in PDS member

PostPosted: Mon Dec 19, 2016 9:08 pm
by Robert Sample
Just got one example in google.
This is insanity. The example may -- or may not -- apply to your site. You need to find examples ON YOUR SITE!
what is (34,2,CH,EQ,C'AB') ?
This is clearly explained in the sort manual for your version of sort. The code is omitting records that have AB in columns 34 and 35 of the input (unless, of course, the input data set is variable length).

Re: JCL to add or remove a line in PDS member

PostPosted: Mon Dec 19, 2016 9:09 pm
by Akatsukami
Have you not been told that the messages will allow us to distinguish between sort products? Messages in the SYSOUT spool data set that begin with ICE indicate DFSORT; messages beginning with WER indicate Syncsort (which, IIRC, is now called DMX).

I begin to come around to Mr. Prins' way of thinking.

Re: JCL to add or remove a line in PDS member

PostPosted: Tue Dec 20, 2016 4:22 am
by NicC
The reason we are being so picky is because although these different products do the same thing the control cards used are not necessarily the same and, even within the same product, may vary depending on whether your data is fixed length or variable length.

As Robert points out, anything on the internet is not necessarily going to work at your place. Each shop has its own standards and naming conventions and you will have to adhere to those.

Do read up in the manual about these control cards that you have found so that you can understand what they do.

Re: JCL to add or remove a line in PDS member

PostPosted: Tue Dec 20, 2016 12:28 pm
by dhana venkatesh
Thanks Robert and Nic for your suggestion.