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

Header,Trailer unchanged -Sort detail recs ONLY USING SORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Aug 02, 2007 1:11 pm
Reply with quote

HI
Please Let me know USING SORT how to sort records between header and trailer . I have searched for posts . But all are using either ICEMAN or ICETOOL ........ Pls let me know how that can be done using EXEC PGM=SORT ??

Thanks !!
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Aug 02, 2007 1:21 pm
Reply with quote

Kalpana,

Download PDF from the provided link and use SORT RECORDS BETWEEN HEADER AND TRAILER topic.

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Aug 02, 2007 2:02 pm
Reply with quote

Thanks .. But that uses ICEMAN ... I want SORT to be used
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 2:07 pm
Reply with quote

sort/iceman, all the same product....
If you have IBM's DFSORT, you have "ICEMAN".....
Back to top
View user's profile Send private message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Aug 02, 2007 2:10 pm
Reply with quote

We do have SYNCSORT only
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 2:25 pm
Reply with quote

Well, that "might" change things...
What release of Syncsort?
Back to top
View user's profile Send private message
gekalpana

New User


Joined: 11 Apr 2007
Posts: 12
Location: Chennai

PostPosted: Thu Aug 02, 2007 2:53 pm
Reply with quote

V1R2
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 3:00 pm
Reply with quote

You should be able to use the example a a guide with Syncsort.
Check the "Addendum. BUILD, IFTHEN, IFOUTLEN, and OVERLAY Parameters".
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Aug 02, 2007 3:15 pm
Reply with quote

Kalpana,

Go through the following link for more info on IFTHEN in SYNCSORT

ibmmainframes.com/viewtopic.php?t=20980&highlight=
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Aug 02, 2007 3:50 pm
Reply with quote

Hi,

Link & indication provided by Murali should have worked for you. Try below JCL, it should work for you (SyncSort site)
Input file is of LRECL=80 & I assume Header & Trailer are determined by 'H' & 'T' as their first letter.
Code:
//STEP050  EXEC PGM=SORT,REGION=4096K               
//*                                                 
//SORTIN   DD  DSN=HLQ.HDR.TLR.FILE,           
//             DISP=SHR                             
//SORTOUT  DD  DSN=HLQ.HDR.TLR.FILE.OUT,       
//             DISP=(NEW,CATLG,CATLG),             
//             DSORG=PS,                           
//             RECFM=FB,                           
//             LRECL=80,                           
//             DATACLAS=LARGE,                     
//             UNIT=SYSDA                           
//SORTWK01 DD  UNIT=SYSDA,SPACE=(CYL,(20,5))       
//SYSIN    DD  *                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(81:C'1')),       
  IFTHEN=(WHEN=(1,1,CH,EQ,C'H'),OVERLAY=(81:C'0')),
  IFTHEN=(WHEN=(1,1,CH,EQ,C'T'),OVERLAY=(81:C'9')) 
  SORT FIELDS=(81,1,CH,A,1,5,CH,A)                 
  OUTREC FIELDS=(1,80)                             
/*                                                 

In above JCL, input HLQ.HDR.TLR.FILE is:
Code:
HDR 
2222
11111
TLR 

& output HLQ.HDR.TLR.FILE.OUT is:
Code:
HDR   
11111
2222 
TLR   


Hope this helps.
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 Aug 02, 2007 9:29 pm
Reply with quote

Quote:
But all are using either ICEMAN ........ Pls let me know how that can be done using EXEC PGM=SORT ??


PGM=ICEMAN and PGM=SORT are equivalent. They both invoke the sort product at your site (DFSORT, Syncsort, CA-Sort). Of course, the sort products are different, but PGM=ICEMAN vs PGM=SORT has nothing to do with that.
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
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 Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top