Copy VB to FB with smaller LRECL without truncating



Support for NetApp SyncSort for z/OS, Visual SyncSort, SYNCINIT, SYNCLIST and SYNCTOOL

Copy VB to FB with smaller LRECL without truncating

Postby Sephiburp » Wed Dec 12, 2012 4:20 pm

Hello there,

I'm looking a way to copy a dsn with lrecl VB 255 to a dsn with FB 133 without losing any data (no truncating).
I'd like to keep the data over 133 characters on the first line and put it at the begining of the next line, and so on.
Just like it's done with Icetool and its Resize operator (see example 3 here)

On my site, since we have Syncsort instead of Icetool, I need to find a way with Syncsort.

I guess I could try with the OUTREC control statement and some of its parameters like IFTHEN or IFOUTLEN but I'm a totally newbie and I don't know where to start...
Do you guys have some clue ?


For example, I have this kind of data in the input dsn :
LINE1111111LINE222
2222LINE3333333LIN
E4444444LINE555555
5LINE6666666


The idea is to get the following output :
LINE1111111
LINE2222222
LINE3333333
LINE4444444
LINE5555555
LINE6666666
Sephiburp
 
Posts: 9
Joined: Wed Dec 12, 2012 12:53 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Copy VB to FB with smaller LRECL without truncating

Postby BillyBoyo » Wed Dec 12, 2012 5:41 pm

Does your data actually appear on more than one record?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Copy VB to FB with smaller LRECL without truncating

Postby Sephiburp » Wed Dec 12, 2012 5:47 pm

Yes it does.
Sephiburp
 
Posts: 9
Joined: Wed Dec 12, 2012 12:53 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Copy VB to FB with smaller LRECL without truncating

Postby BillyBoyo » Wed Dec 12, 2012 5:52 pm

That's "handy" (can't find the Irony tags, as usual).

Is there a "pattern" to this behaviour? If your data can start in any one of 251 positions, the code will be "lengthy" in Sort.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Copy VB to FB with smaller LRECL without truncating

Postby Sephiburp » Thu Dec 13, 2012 1:41 am

I'm not sure to understand well your question, but I would answer : yes the data can start in any one of 251 positions.

Just go back on my previous example.

Input VB 22 :
LINE1111111LINE222
2222LINE3333333LIN
E4444444LINE555555
5LINE6666666LINE77
77777LINE8888888LI
NE9999999LINE00000
00


The input file is VB 22 (4+18), length 18 is too long for the content.
Each real line begins with "LINE" and length is 11.
Hence the need to copy to a FB 11 so that the whole file is correct.

Output FB 11
LINE1111111
LINE2222222
LINE3333333
LINE4444444
LINE5555555
LINE6666666
LINE7777777
LINE8888888
LINE9999999
LINE0000000
Sephiburp
 
Posts: 9
Joined: Wed Dec 12, 2012 12:53 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Copy VB to FB with smaller LRECL without truncating

Postby Akatsukami » Thu Dec 13, 2012 1:54 am

Whilst, if you need this yesterday, *Sort may be the way to go (if only because you can get experts such as Mr. Boyo or Mr Kolusu to write the control deck for you), you may wish to undertake an in-depth (i.e., not just learning to spell the name) study of some programming language so that in the future you may quickly and easily handle these trivial problems on your own.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Copy VB to FB with smaller LRECL without truncating

Postby dick scherrer » Thu Dec 13, 2012 2:50 am

Hello,

How many records might there be in the input?
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Copy VB to FB with smaller LRECL without truncating

Postby Sephiburp » Thu Dec 13, 2012 2:55 am

The input file change every day, number of records might never be the same.
Sephiburp
 
Posts: 9
Joined: Wed Dec 12, 2012 12:53 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Copy VB to FB with smaller LRECL without truncating

Postby Akatsukami » Thu Dec 13, 2012 2:59 am

Then give us an order-of-estimate for the range.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1058
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

Re: Copy VB to FB with smaller LRECL without truncating

Postby Sephiburp » Thu Dec 13, 2012 3:02 am

Could be from 100 to 5000 records.
Sephiburp
 
Posts: 9
Joined: Wed Dec 12, 2012 12:53 pm
Has thanked: 1 time
Been thanked: 0 time

Next

Return to Syncsort/Synctool

 


  • Related topics
    Replies
    Views
    Last post