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
 

 

Header,Trailer unchanged -Sort detail recs ONLY USING SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Header,Trailer unchanged -Sort detail recs ONLY USING SORT
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: 1439
Location: Bangalore,India

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

Kalpana,

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

http://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    Post subject: Re: Header,Trailer unchanged -Sort detail recs ONLY USING SO
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: 3158
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 2:07 pm    Post subject:
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    Post subject: Re: Header,Trailer unchanged -Sort detail recs ONLY USING SO
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: 3158
Location: Tucson AZ

PostPosted: Thu Aug 02, 2007 2:25 pm    Post subject:
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    Post subject: Re: Header,Trailer unchanged -Sort detail recs ONLY USING SO
Reply with quote

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

Global Moderator


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

PostPosted: Thu Aug 02, 2007 3:00 pm    Post subject:
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: 1439
Location: Bangalore,India

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

Kalpana,

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

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

Senior Member


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

PostPosted: Thu Aug 02, 2007 3:50 pm    Post subject:
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 Moderator


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

PostPosted: Thu Aug 02, 2007 9:29 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Optimize sort inrec parse vishwakotin DFSORT/ICETOOL 6 Mon Jun 26, 2017 11:15 pm
No new posts Reduce CPU Times for Join Sort santoshn SYNCSORT 12 Sat Jun 10, 2017 1:40 pm


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