View previous topic :: View next topic
|
Author |
Message |
Auryn
New User
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
Hello everybody,
've got a huge vb dataset with lots of rows and the relevant data starts at pos. 36 / byte 40. So I'd like to shift left all the recs for 35 bytes.
It's pretty easy to do so vith IEBGENER. But the problem is IEBGENER adds 35 bytes x'00' to the new end so the rec length stays as it was before shifting. IEBGENER does not manipulate the record length stored in the very first two bytes / decrease it.
Does anybody of you know an easy way to shift data in vb records without adding x'00'?
If the only solution is to shift the data via IEBGENER (as I do already) in a first step and decrease the record length with FileAid, ICE... or so, in a second that would be fine for me.
But if there is a solution with only one tool and one step, ... |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Why not use a simple BUILD the way you want? |
|
Back to top |
|
|
Auryn
New User
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
Rohit Umarjikar wrote: |
Why not use a simple BUILD the way you want? |
... Cause the data are as they are. I did not "produce" them. I only try to process them, to modify them in a way they are more useful for me. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
I still don’t follow you .. you want to shift first 35 bytes to somewhere then BUILD the way you want using DFSORT .
Please provide us sample input and expected output to be sure of what is expected. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2126 Location: USA
|
|
|
|
Code: |
...,BUILD=(1:36,40),... |
It will move 40 bytes from position 36 to position 1, without adding neither X'00' nor anything else at the end.
What is your problem? Did you try to do anything at all???
There may be an issue with conversion between RECFM=VB and RECFM=FB.
I leave this issue to be resolved by yourself. |
|
Back to top |
|
|
Auryn
New User
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
O.k., another try. Did not expect some samples are necessary.
Anyway.
The source dataset is vb and contains some data like
Code: |
xxxxJCL
xxxxMAINFRAME
xxxxSORT
xxxxICETOOL
xxxxCOBOL |
In this example I'd like to shift the date four bytes left and remove the xxxx so the result - vb as well - should be
Code: |
JCL
MAINFRAME
SORT
ICETOOL
COBOL |
When I tried with IEBGENER the undesired result was
Code: |
JCL....
MAINFRAME....
SORT....
ICETOOL....
COBOL.... |
where the attached .... in this example should represent x'00' |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
You have a solution right there to try before you post this sample data .. answer remains same please use BUILD and ex is already shown . |
|
Back to top |
|
|
Auryn
New User
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
sergeyken wrote: |
Code: |
...,BUILD=(1:36,40),... |
It will move 40 bytes from position 36 to position 1, without adding neither X'00' nor anything else at the end.
What is your problem? Did you try to do anything at all???
There may be an issue with conversion between RECFM=VB and RECFM=FB.
I leave this issue to be resolved by yourself. |
Thank you for this hint. Did not see anything like this in the manuals.
Gonna try this on monday when I'm back in the office.
Good night from Germany |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2126 Location: USA
|
|
|
|
Auryn wrote: |
sergeyken wrote: |
Code: |
...,BUILD=(1:36,40),... |
It will move 40 bytes from position 36 to position 1, without adding neither X'00' nor anything else at the end.
What is your problem? Did you try to do anything at all???
There may be an issue with conversion between RECFM=VB and RECFM=FB.
I leave this issue to be resolved by yourself. |
Thank you for this hint. Did not see anything like this in the manuals.
Gonna try this on monday when I'm back in the office.
Good night from Germany |
The only option not to see any of 100500 existing examples on BUILD parameter is: WHEN HAVE NEVER OPENED ANY UTILITY GUIDE. |
|
Back to top |
|
|
Auryn
New User
Joined: 11 Jan 2006 Posts: 84 Location: Lower Saxony (DE)
|
|
|
|
After several tries of variations of upper recommendation and
RC016 / WER235A OUTDAT : OUTREC RDW NOT INCLUDED and
RC016 / WER244A OUTDAT : OUTREC - SHORT RECORD
This brought the desired result:
Code: |
OUTFIL BUILD=(01,04,
05:41) |
Maybe there are still some aspects I did not consider. But this works as desired.
I'd say this issue is resolved. IMO there is no furter conversation needed.
And @ Rohit: Thank you for your very helpful and friendly comments. You made my day(s). |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
You are most welcome ! |
|
Back to top |
|
|
|