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

Sort - dynamic starting position in outrec


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Wed May 07, 2014 6:57 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts INCLUDE OMIT COND for Multiple values... DFSORT/ICETOOL 5
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top