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 HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 0 Mon Jan 02, 2017 11:16 am
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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