View previous topic :: View next topic
|
Author |
Message |
knobi
New User
Joined: 16 Aug 2005 Posts: 54
|
|
|
|
good evening everyone.
does anyone knows how to do this with dfsort (FB, LRECL 200) ?
each 3 lines should be merged into 1 line
Input
Code: |
kakfjk ajaijdi aisjdi dsijisjdisjia iajsidj iajs
AAAA asjdijsidji sa iasjidjas i aisjidjasd
BBBB asjdijsidji sa iasjidjas i aisjidjasd
asdjjd ajsijdiasjid aijs idjasidjiasjdijsaij iajsi
AAAA aoskdksaod oaksod koa oakosdk oka
BBBB oasdoka ais09idaksa oaksokdo93 ok |
Output
Code: |
kakfjk ajaijdi aisjdi dsijisjdisjia iajsidj iajs AAAA asjdijsidji sa iasjidjas i aisjidjasd BBBB asjdijsidji sa iasjidjas i aisjidjasd
asdjjd ajsijdiasjid aijs idjasidjiasjdijsaij iajsi AAAA aoskdksaod oaksod koa oakosdk oka BBBB oasdoka ais09idaksa oaksokdo93 ok |
Note: first line should be succeeded of AAAA and then BBBB
Note: first word of each first line may vary
Note: AAAA and BBBB never changes |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
search for RESIZE (a DFSORT/ICETOOL operator)
Gerry |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Do you need the records to be "concatenated" in the sense that trailing blanks on the records are to be ingored for putting them together?
If so, can you have multiple blanks embedded in the data, and if so, can we assume you'd like them retained? |
|
Back to top |
|
|
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
knobi,
See if below helps...
Code: |
//STEP0001 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD INPUT FB/200
//OUT DD OUTPUT FB/600
//TOOLIN DD *
RESIZE FROM(IN) TO(OUT) TOLEN(600)
/*
|
Thanks, |
|
Back to top |
|
|
|