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
 
Sort - dynamic starting position in outrec

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

New User


Joined: 30 Sep 2006
Posts: 60

PostPosted: Wed May 07, 2014 6:13 pm    Post subject: Sort - dynamic starting position in outrec
Reply with quote

Hi,

I have a requirement to output bytes from a position which is dependent on another field in the file. The file is a VB file with data depending on a fixed section of 1000 bytes followed by variable blocks of 10 bytes each. The requirement is to get the data from the last variable block- the trailer count (position 50-55) is part of the fixed section.

For e.g. if the value of block count in position 50-55 is 1, i need to outrec 10 bytes from 1000 + 1* 10 ie 1010 position. If the value is 15, the field output should be from 1000 + 15 * 10 ie 1150th position.

One option was to have different IFTHEN OUTREC statements and hardcoding all values - but the number of combinations is huge.

Please let me know if there are options to select data from a position based on another field through sort.

Thanks,
Aneesh.
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7314

PostPosted: Wed May 07, 2014 6:57 pm    Post subject: Reply to: Sort - dynamic starting position in outrec
Reply with quote

You mean you have 1000 fixed, then a number of 10-byte occurrences, then there is, after the final occurence on that record, the data you want?

What is in the 10 bytes? What is in the extra part?
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 Build Dynamic Sort output and limit '... balaji81_k DFSORT/ICETOOL 1 Sat Feb 02, 2019 4:40 am
This topic is locked: you cannot edit posts or make replies. PARAMETER 'F1' IS UNIDENTIFIED error ... Poha Eater DFSORT/ICETOOL 14 Fri Feb 01, 2019 2:39 pm
No new posts SORT INNER JOIN [F1] OUT OF SEQ ERROR balaji81_k DFSORT/ICETOOL 8 Wed Jan 30, 2019 3:21 am
No new posts Dates compare on specific dates using... balaji81_k DFSORT/ICETOOL 2 Thu Jan 24, 2019 12:03 am
No new posts Joining 2 records to 1 using Sort cmuncan DFSORT/ICETOOL 1 Sat Dec 08, 2018 8:53 am

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