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

[Solved]Shift left VB record without x00 ending - IceTool?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Auryn

New User


Joined: 11 Jan 2006
Posts: 84
Location: Lower Saxony (DE)

PostPosted: Fri Oct 06, 2023 8:05 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Fri Oct 06, 2023 8:26 pm
Reply with quote

Why not use a simple BUILD the way you want?
Back to top
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 84
Location: Lower Saxony (DE)

PostPosted: Fri Oct 06, 2023 8:38 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Fri Oct 06, 2023 8:41 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2126
Location: USA

PostPosted: Fri Oct 06, 2023 9:50 pm
Reply with quote

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??? 824.gif

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
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 84
Location: Lower Saxony (DE)

PostPosted: Sat Oct 07, 2023 3:22 am
Reply with quote

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' icon_neutral.gif
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Sat Oct 07, 2023 3:23 am
Reply with quote

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
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 84
Location: Lower Saxony (DE)

PostPosted: Sat Oct 07, 2023 3:25 am
Reply with quote

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??? 824.gif

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Sat Oct 07, 2023 7:16 am
Reply with quote

www.ibm.com/docs/en/zos/3.1.0?topic=statements-outfil-control

Everything is in the manual .. also there are many ways to skin the cat ..

You can use INREC overlay too .
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2126
Location: USA

PostPosted: Sat Oct 07, 2023 6:51 pm
Reply with quote

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??? 824.gif

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
View user's profile Send private message
Auryn

New User


Joined: 11 Jan 2006
Posts: 84
Location: Lower Saxony (DE)

PostPosted: Fri Oct 13, 2023 2:15 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Fri Oct 13, 2023 2:18 pm
Reply with quote

You are most welcome !
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 combine multiple unique records into ... DFSORT/ICETOOL 2
No new posts SORT on detail record, then repeat he... DFSORT/ICETOOL 3
No new posts how to complete the end of a record w... DFSORT/ICETOOL 2
No new posts ICETOOL to SUM String DFSORT/ICETOOL 1
No new posts Sort based on the record type DFSORT/ICETOOL 1
Search our Forums:

Back to Top