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
 

 

Is it possible using DFSORT

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

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Wed Aug 28, 2013 12:16 pm    Post subject: Is it possible using DFSORT
Reply with quote

Hello All,

I have a requirement in my project and would like to know if it is possible using DFSORT.

I have a file as shown below - 80 rec len. H-header, T-trailer, 9-data. The file contains header-trailer groups with detail records in between. eg.
H
T
H
9
T
H
9
9
T
H
9
T

I need to spilt this file into two. The threshold value is 7. It means that the first file should contain the records with record count less than 7 and also only upto the latest HT group. ie if the seventh record is either H or 9, then only records upto the latest T should be present in the first file and the remaining should be pushed to file2.

I have written a SELCOPY program to achieve this. But just wanted to know if it can be done using DFSORT.

Output should be
File 1
H
T
H
9
T

File 2
H
9
9
T
H
9
T
Back to top
View user's profile Send private message

Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Wed Aug 28, 2013 4:30 pm    Post subject: No Replies
Reply with quote

Since there are no replies,

I guess this is not possible.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Aug 28, 2013 4:49 pm    Post subject:
Reply with quote

It is less that four and a quarter hours since you originally posted and yet you decry the lack of response so quickly.

People that respond do so in THEIR time, not yours. They also respond for FREE

Also remember that a lot of the respondants live in a different time zone than you do.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Wed Aug 28, 2013 5:14 pm    Post subject: Reply to: Is it possible using DFSORT
Reply with quote

http://ibmmainframes.com/viewtopic.php?p=311372#311372
Back to top
View user's profile Send private message
Musab Ahmed

New User


Joined: 10 Dec 2012
Posts: 37
Location: India

PostPosted: Wed Aug 28, 2013 10:04 pm    Post subject:
Reply with quote

i didnt mean to be rude..
dont get so sensitive expat.
bad to your health.
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1238
Location: Richfield, MN, USA

PostPosted: Thu Aug 29, 2013 8:04 am    Post subject:
Reply with quote

If you've seen as many "impatient" posts as some of the rest of us over the years, you might well have responded in the same manner as expat. icon_smile.gif
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Tue Sep 03, 2013 10:33 pm    Post subject: Re: No Replies
Reply with quote

Musab Ahmed wrote:
Since there are no replies,

I guess this is not possible.


As others already mentioned, not every one works in your time zone or round the clock without vacation.

Yes it is quite simple task for DFSORT if you follow the steps listed below

1. Using INREC IFTHEN=(WHEN=INIT, overlay a 8 byte sequence number at position 81.

2. On the same Inrec use IFTHEN=(WHEN=GROUP, and check for seqnum=7 and the 1st byte as either "H" or "9" as BEGIN parms and check for "T" on the END parm and PUSH the sequence at 81 onto position 81. By doing so you have set the keys to be split.

3. Using OUTFIL INCLUDE with sequence number at 81 LE 7 write them file1 and BUILD just the 80 bytes. For File2 you can use SAVE parm on outfil to write out the rest of the records.
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 How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts DFSORT sorting only specific records akodakka DFSORT/ICETOOL 4 Thu Aug 04, 2016 11:24 am
No new posts Symbolic Parameters in SYSIN DD state... madishpa DFSORT/ICETOOL 3 Mon Jun 27, 2016 6:23 pm
No new posts DFSORT to match two files and write John F Dutcher DFSORT/ICETOOL 6 Thu May 12, 2016 5:17 pm


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