Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
sorting records but i need to omit headers

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ajayvamsi
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:22 pm    Post subject: sorting records but i need to omit headers
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: 1439
Location: Bangalore,India

PostPosted: Fri Oct 05, 2007 12:24 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Fri Oct 05, 2007 12:35 pm    Post subject: Reply to: sorting records but i need to omit headers
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
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:49 pm    Post subject:
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
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

PostPosted: Fri Oct 05, 2007 12:50 pm    Post subject:
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    Post subject: sorting records but i need to omit headers
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Fri Oct 05, 2007 1:09 pm    Post subject: Reply to: sorting records but i need to omit headers
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: 1288
Location: Chennai, India

PostPosted: Fri Oct 05, 2007 1:19 pm    Post subject: Reply to: sorting records but i need to omit headers
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: 1439
Location: Bangalore,India

PostPosted: Fri Oct 05, 2007 1:52 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Oct 05, 2007 2:17 pm    Post subject: Reply to: sorting records but i need to omit headers
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
Currently Banned

New User


Joined: 21 Jul 2005
Posts: 56
Location: Hyderabad

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

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

Senior Member


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

PostPosted: Wed Oct 10, 2007 12:04 pm    Post subject: Reply to: sorting records but i need to omit headers
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    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 sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 22 Sun Aug 27, 2017 10:35 pm
No new posts Sorting on text - but in non-alphabet... Roy Ware SYNCSORT 5 Wed Aug 23, 2017 9:15 pm
No new posts Include/omit with "ALL" pa... mgl DFSORT/ICETOOL 6 Wed Jun 14, 2017 2:31 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us