I have a record(file is sequential) with first 100 bytes having general information and from 101 position for every 20 bytes the data will change(lay out is same) likely 10 segments are there.
Code:
File:
1------------100MMMMMYYYYYAAAAA
Here M, Y and A are fields which have 20 bytes a total of 10 segments like that.
I need to create 10 segments in one record to different 10 output files(one output file per segment)
If I create with more than 8 output files I'm seeing the error maximum output files reached.
So I had to create 7 files in one step and 3 in other step and later merging based on key(s).
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
mf_123,
Welcome to the forums, Since you posted in DFSORT forum, I believe you are looking for a DFSORT equivalent of your file-aid batch process here.
Look for examples with OUTFIL FILES or OUTFIL FNAMES where you can have multiple outputs and use BUILD=(starting pos,length,....) to determine which fields should be written to each output. Good luck.
Welcome to the forums, Since you posted in DFSORT forum, I believe you are looking for a DFSORT equivalent of your file-aid batch process here.
Look for examples with OUTFIL FILES or OUTFIL FNAMES where you can have multiple outputs and use BUILD=(starting pos,length,....) to determine which fields should be written to each output. Good luck.
Thanks Arun. I also need to validate a segment is not empty(the first field in a segment) only then I need to write into output file.
Mf_123, Welcome !
But you need to post in the correct section of this forum( or if don’t know then say it when you post ), people have to spend time based on assumptions that you require a DFSORT solution since it posted under DFSORT.
You have not asked DFSORT alternative no where in your posting so this should be moved over to the different section of this forum along with Relevant replies..
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
Contact the vendor to see if what you want to do is even possible. The File Aid manual states that return code 8 is set when "No records copied to the output dataset during a COPY, DROP or USER function" and further states that
Quote:
The decimal return codes issued by File-AID always reflect the highest error detected during execution.
So unless the vendor gives you a way to avoid this condition, you will be stuck with getting return code 8 when one (or more) output data sets are empty -- so your choices will be to live with the 8 or use a different program / utility other than File Aid to do what you want.