Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Automate the activity of SORT utility in Production

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Automate the activity of SORT utility in Production
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

Site Director


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

PostPosted: Wed Apr 11, 2007 11:29 pm    Post subject:
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 Moderator


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

PostPosted: Wed Apr 11, 2007 11:34 pm    Post subject:
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    Post subject: Re: Automate the activity of SORT utility in Production
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 Moderator


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

PostPosted: Thu Apr 12, 2007 8:25 pm    Post subject:
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

Site Director


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

PostPosted: Thu Apr 12, 2007 8:48 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us