IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Automate the activity of SORT utility in Production


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jagankallis
Warnings : 1

New User


Joined: 28 Jun 2006
Posts: 29
Location: DUISBURG

PostPosted: Wed Apr 11, 2007 11:24 pm
Reply with quote

Dear All,

I want to automate the activity of SORT utility in Production.

Code:
//S010      EXEC PGM=SORT                                     
//SYSOUT    DD SYSOUT=*                                       
//SYSPRINT  DD SYSOUT=*                                       
//SORTIN    DD DISP=SHR,                                     
//             DSN='A VERY VERY BIG UNSORTED TAPE FILE'       
//SORTOUT   DD DSN=OUTPUT FILE,                               
//             DISP=(NEW,CATLG,DELETE),                       
//             UNIT=AUTO,                                     
//             LABEL=RETPD=3650,                             
//             DCB=(RECFM=VB,LRECL=3000,BLKSIZE=0)           
//SYSIN     DD *                                             
  INCLUDE COND=((24,16,CH,EQ,C'XXXXXXXXXXXXXXXX'),OR,         
                            .
                            .
                            .   
                 (24,16,CH,EQ,C'yyyyyyyyyyyyyyyy'))           
  SORT FIELDS=COPY                                           
/* 


I want to specify the keys given in INCLUDE COND in a file.
I want to make sure that whatever approach I follow I never need to SORT the under any circumstance.

Is it possible?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed Apr 11, 2007 11:29 pm
Reply with quote

Hello,

Please post some sample data and what you want as output.

I'm not sure how to automate sort but never need to use sort icon_confused.gif

When you show your input and what the out0put needs to be, we can offer suggestions.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Apr 11, 2007 11:34 pm
Reply with quote

Quote:
I want to specify the keys given in INCLUDE COND in a file.


You can use a file or a PDS member as the SYSIN DD input as long as it has RECFM=FB and LRECL=80. You can concatenate such files with other such files or DD * statements. For example, if you had INCLUDE.CTL with your INCLUDE statement, you could use:

Code:

//SYSIN DD *
  SORT FIELDS=COPY
//  DD DSN=INCLUDE.CTL,DISP=SHR


Quote:
I want to make sure that whatever approach I follow I never need to SORT the under any circumstance.


I can't figure out what this sentence means. Are some words missing?
Back to top
View user's profile Send private message
jagankallis
Warnings : 1

New User


Joined: 28 Jun 2006
Posts: 29
Location: DUISBURG

PostPosted: Thu Apr 12, 2007 3:53 pm
Reply with quote

I have a GDG => EORGA.RA.SAMPLE with many generations

Sample EORGA.RA.SAMPLE.G0001V00 (sorted on first 10 bytes) content

Code:
1111111111rama               
1111111111rama               
1111111111rama               
1111111111rama               
1111111111rama               
1111111112sita               
1111111112sita               
1111111112sita               
1111111112sita               
1111111112sita               
1111111112sita     


Sample EORGA.RA.SAMPLE.G0002V00 (sorted on first 10 bytes) content

Code:
1111111111jagan     
1111111111jagan     
1111111111jagan     
1111111111jagan     
1111111111jagan     
1111111112rajesh     
1111111112rajesh     
1111111112rajesh     
1111111113kamala     
1111111113kamalakar 
1111111113tom alter


Now my input is EORGA.RA.SAMPLE entire GDG will all version and the latest version GDG at the top in the concatenation and the earliest version of the GDG at the bottom

and I give in my INCLUDE COND many keys...
for our example we take the KEY '1111111111'
and my desired output is

Code:
1111111111jagan     
1111111111jagan     
1111111111jagan     
1111111111jagan     
1111111111jagan


and

Code:
1111111111rama               
1111111111rama               
1111111111rama               
1111111111rama               
1111111111rama


should not be retrieved.

Is there a way possible using SORT??
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Apr 12, 2007 8:25 pm
Reply with quote

I really can't figure out what it is you want to do from your explanation. Maybe somebody else can.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Apr 12, 2007 8:48 pm
Reply with quote

Hello,

My guess is that the example data and desired results are incorrectly/imcompletely posted.

Maybe Jagannathan B will review and re-post with better explanation(s).

I'm not sure how the gdg versions relate to the INCLUDEs - unless there is some thought that sort will "know" when if crosses to another generation and will apply the desired INCLUDE to the appropriate version.

Of course, i may be way off . . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts REASON 00D70014 in load utility DB2 6
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top