SORT FIELDS=(1,32,CH,A)



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

SORT FIELDS=(1,32,CH,A)

Postby dn2012 » Tue Feb 28, 2012 10:51 pm

Hello,

I have following step in my current JCL for sort.

//SORT    EXEC PGM=SORT,COND=(0,NE,LISTCAT)                           
//SORTIN   DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(DEFAULT)       
//         DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(CWS)           
//         DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(TCIS0228)       
//         DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(PDB) ## 10/28/11
//         DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(ETRS1211)       
//SORTOUT  DD DISP=(NEW,CATLG,DELETE),                               
//            DSN=IMSTESTA.IMF310.ITD.SOURCE.DATA.GDG(+1),           
//            SPACE=(CYL,(10,10)),UNIT=SYSDA,                         
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=32000)                   
//SYSOUT   DD SYSOUT=*                                               
//SYSPRINT DD SYSOUT=*                                               
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(10,10))                         
//SORTWK02 DD UNIT=SYSDA,SPACE=(CYL,(10,10))                         
//SORTWK03 DD UNIT=SYSDA,SPACE=(CYL,(10,10))                         
//SORTWK04 DD UNIT=SYSDA,SPACE=(CYL,(10,10))                         
//SORTWK05 DD UNIT=SYSDA,SPACE=(CYL,(10,10))                         
//SORTWK06 DD UNIT=SYSDA,SPACE=(CYL,(10,10))
//*    SORT FIELDS=(1,32,CH,A)             
//SYSIN    DD *                             
  SORT FIELDS=(1,32,CH,A)                   
  SUM FIELDS=NONE                           
/*                                         


Now I want this will be process the records under group MCIPROB from the IMSTESTA.IMF310.ITD.SOURCE(TCIS0228).
IS it ok to use as SORT FIELDS=(1,32,CH,A,MCIPROB)

I appreciate your help.

Thank You
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT FIELDS=(1,32,CH,A)

 

Re: SORT FIELDS=(1,32,CH,A)

Postby dn2012 » Tue Feb 28, 2012 11:00 pm

I did put SORT FIELDS=(1,32,CH,A,MCIPROB) but getting error as

ICE007A P SYNTAX ERROR
SUM FIELDS=NONE
ICE052I J END OF DFSORT
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT FIELDS=(1,32,CH,A)

Postby enrico-sorichetti » Tue Feb 28, 2012 11:23 pm

since the forum has the sections dedicated to the most common sort product SYNCSORT and DFSORT/ICETOOL
it is wiser to post in the proper sections

it just a waste of time to invent Your own control statements syntax
better spend time reading and meditating on the the manuals ...
DFSORT/ICETOOL Reference Material

and to search the forum for snippets and examples

also to get good help it is necessary to describe in a proper way the requirement and the environment

DCBs of input and output files
the process to be done
significant excerpts of the input file records
and the output expected based on the above
naturally when showing the input and output records helps to describe the requirement
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: SORT FIELDS=(1,32,CH,A)

Postby Frank Yaeger » Wed Feb 29, 2012 12:49 am

Now I want this will be process the records under group MCIPROB from the IMSTESTA.IMF310.ITD.SOURCE(TCIS0228).
IS it ok to use as SORT FIELDS=(1,32,CH,A,MCIPROB)


Your description of what you want to do is not at all clear so nobody can help you.

What do you mean by the "group MCIPROB"? Do you mean records that have "MCIPROB" in some specific positions, or anywhere in the record, or something entirely different. SORT FIELDS=(1,32,CH,A) sorts ascending on positions 1-32. What does that have to do with MCIPROB? Are you looking to INCLUDE records that have MCIPROB? You have to explain clearly what you want to do before anyone can help you.

If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from:

http://www.ibm.com/support/docview.wss? ... g3T7000080
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: SORT FIELDS=(1,32,CH,A)

Postby dn2012 » Wed Feb 29, 2012 12:55 am

we have data in 'IMSTESTA.IMF310.ITD.SOURCE(TCIS0228)" as

MCTPCLDRC000300         MCIJSD  ..........
MCTPMNAMC000300         MCIJSD  ..........
MCTPMCASC000300         MCIJSD  ..........
MCTPMCA1C000300         MCIJSD  ..........
MCTPCLDRC000493         MCIPROB ..........
MCTPMNAMC000493         MCIPROB ..........
MCTPMCASC000493         MCIPROB ..........
MCTPMCA1C000493         MCIPROB ..........
MCTPCLDRC000526         MCIPROB ..........
MCTPMNAMC000526         MCIPROB ..........
MCTPMCASC000526         MCIPROB ..........
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT FIELDS=(1,32,CH,A)

Postby Frank Yaeger » Wed Feb 29, 2012 1:28 am

You can use a DFSORT job like the following to "process" the records with MCIPROB from 'IMSTESTA.IMF310.ITD.SOURCE(TCIS0228)" in the same way you are processing the records from multiple data sets:

//S1   EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DISP=OLD,DSN=IMSTESTA.IMF310.ITD.SOURCE(TCIS0228)
//SORTOUT  DD DSN=...  output file
//SYSIN    DD *
   INCLUDE COND=(p,7,CH,EQ,C'MCIPROB')
   SORT FIELDS=(1,32,CH,A)
   SUM FIELDS=NONE
/*


Change p to the starting position of MCIPROB in your records (e.g. 33? 34?)
Frank Yaeger - DFSORT Development Team (IBM) - yaeger@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
User avatar
Frank Yaeger
Global moderator
 
Posts: 1080
Joined: Sat Jun 09, 2007 8:44 pm
Has thanked: 0 time
Been thanked: 14 times

Re: SORT FIELDS=(1,32,CH,A)

Postby dn2012 » Wed Feb 29, 2012 1:50 am

Thanks

But I am getting SDSF output as

ICE000I J - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 12:19 ON TUE FE
INCLUDE COND=(P,7,CH,EQ,C'MCIPROB')
$
ICE007A 1 SYNTAX ERROR
SORT FIELDS=(1,32,CH,A)
SUM FIELDS=NONE
ICE052I J END OF DFSORT
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT FIELDS=(1,32,CH,A)

Postby Akatsukami » Wed Feb 29, 2012 1:58 am

dn2012 wrote:Thanks

But I am getting SDSF output as

ICE000I J - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 12:19 ON TUE FE
INCLUDE COND=(P,7,CH,EQ,C'MCIPROB')
$
ICE007A 1 SYNTAX ERROR
SORT FIELDS=(1,32,CH,A)
SUM FIELDS=NONE
ICE052I J END OF DFSORT

What part of
Frank Yaeger wrote:Change p to the starting position of MCIPROB in your records (e.g. 33? 34?)

didn't you understand?
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: SORT FIELDS=(1,32,CH,A)

Postby dn2012 » Wed Feb 29, 2012 2:02 am

thanks

INCLUDE COND=(26,7,CH,EQ,C'MCIPROB')

Out from SDSF:

ICE080I 0 IN MAIN STORAGE SORT
ICE055I 0 INSERT 0, DELETE 206261
ICE054I 0 RECORDS - IN: 206261, OUT: 0
ICE173I 0 NO RECORDS FOR THE SORTOUT DATA SET - RC=0
ICE134I 0 NUMBER OF BYTES SORTED: 0
ICE253I 0 RECORDS SORTED - PROCESSED: 0, EXPECTED: 3704000
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 900 , TRACKS USED: 0
ICE199I 0 MEMORY OBJECT USED AS MAIN STORAGE = 0M BYTES
ICE299I 0 MEMORY OBJECT USED AS WORK STORAGE = 0M BYTES
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 0 END OF DFSORT
dn2012
 
Posts: 114
Joined: Thu Feb 16, 2012 6:10 am
Has thanked: 0 time
Been thanked: 0 time

Re: SORT FIELDS=(1,32,CH,A)

Postby enrico-sorichetti » Wed Feb 29, 2012 2:14 am

from the data You posted the MCI... stuff starts at 25,
but if the record format is variable You should add 4 to the position You see when browsing the data under ISPF
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Next

Return to JCL

 


  • Related topics
    Replies
    Views
    Last post