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

sorting records but i need to omit headers


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

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:22 pm
Reply with quote

Hi all,
we have a requirement like I need to sort a file which will contain as below

input file:-
00001817092007ARZLM4000012007260013236 000000
000001000001000001000001400001NNNNNNDN0006010730001239109000103
000002000001000001000001400001NNNNNNDN0006010730001239109000103
00001217092007ARZLM4001012007260013416 000000
000001000001000001000001400101NNNNNNDN0006010731001243703000101000
000002000002000001000002400101NNNNNNEN0006010731001085005000101000
000003000003000001000003400101YNYYNNGX0006010731001246607000101000
000004000004000001000003400101YNYYNNGX0006010731001246706000101000


in the above input file we have 2 header records
My requirement is I need to stick the header records as they are but only detail records need to be sorted ...could any one give me a good solution

Please dont give a solution using ICETOOL...

Please help using sort only
thanks
ajay
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Oct 05, 2007 12:24 pm
Reply with quote

Ajay,

How do you recognize the header record?

Quote:
Please dont give a solution using ICETOOL...

Whats wrong with the ICETOOL? Its also a DFSORT production (extension of dfsort).
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 05, 2007 12:35 pm
Reply with quote

This topic has been debated to death....
( search the forum for solution samples )

Anyway steps to be taken

- determine the offset/position an the length of the key for the records You want to exclude
( remember to add 4 in case of variable length records )

- write the sort statements adding the OMIT statements
(there are gazillions samples on the forum)

- read as pointed out by Frank sort tips and tricks

regards

e.s
Back to top
View user's profile Send private message
ajayvamsi

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:49 pm
Reply with quote

Just by space at loction 47 we need to recognize as a header record
Back to top
View user's profile Send private message
ajayvamsi

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:50 pm
Reply with quote

could any give me the sample JCL structure please instead of using words which does not help
Back to top
View user's profile Send private message
Rambhupal.chaudari

New User


Joined: 30 Mar 2007
Posts: 25
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 1:02 pm
Reply with quote

Hi ajay,
I have one doubt, are there only 2 header records in ur input file and remaining are detail records.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Oct 05, 2007 1:09 pm
Reply with quote

Quote:
could any give me the sample JCL structure please instead of using words which does not help


/rudeness on
Why don't You show that You tried instead of asking somebody else to do Your work ??
/rudeness off

regards

e.s
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Oct 05, 2007 1:19 pm
Reply with quote

Ajay,

Use this JCL for your requirement.

Code:
//S1    EXEC  PGM=ICEMAN                                               
//SYSOUT    DD  SYSOUT=*                                               
//SORTIN DD *                                                           
00001817092007ARZLM4000012007260013236 000000                           
000001000001000001000001400001NNNNNNDN0006010730001239109000103         
000002000001000001000001400001NNNNNNDN0006010730001239109000103         
00001217092007ARZLM4001012007260013416 000000                           
000001000001000001000001400101NNNNNNDN0006010731001243703000101000     
000002000002000001000002400101NNNNNNEN0006010731001085005000101000     
000003000003000001000003400101YNYYNNGX0006010731001246607000101000     
000004000004000001000003400101YNYYNNGX0006010731001246706000101000     
/*                                                                     
//SORTOUT DD DSN=HLQ.HTEY,DISP=(,CATLG,CATLG)       
//SYSIN    DD    *                                                     
   INREC IFTHEN=(WHEN=INIT,OVERLAY=(71:SEQNUM,8,ZD)),                   
    IFTHEN=(WHEN=(47,1,CH,EQ,C' '),                                     
       OVERLAY=(71:SEQNUM,8,ZD,79:C'A')),                         
    IFTHEN=(WHEN=(47,1,CH,NE,C' '),                                     
        OVERLAY=(79:C'B',80:SEQNUM,8,ZD,                           
              71:71,8,ZD,SUB,80,8,ZD,M11,LENGTH=8))             
   SORT FIELDS=(71,9,CH,A,1,66,CH,A)                               
   OUTREC FIELDS=(1,70)                 
/*                         



I have sorted the detailed records starting from 1 till 66. Please code according to your requirements. The Input data is already in the sorted order.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Fri Oct 05, 2007 1:52 pm
Reply with quote

Ajay,

Quote:
instead of using words which does not help

Please remeber we are here to assist you NOT to do your (complete) work.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Oct 05, 2007 2:17 pm
Reply with quote

Quote:
instead of using words which does not help


Definitely words would have been of great help had you followed that. Yes, as said this has been debated before and you could have searched the forum.


Moreover, Your O/P din't have all the details we were looking for (Sorting field positions etc) .
Back to top
View user's profile Send private message
ajayvamsi

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Wed Oct 10, 2007 11:46 am
Reply with quote

ok cool
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Oct 10, 2007 12:04 pm
Reply with quote

ajay,

Did that sort card work? Else, post your queries here.
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 INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Grouping by multiple headers DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. Automation need help in sorting the data DFSORT/ICETOOL 38
Search our Forums:

Back to Top