kranthikumarb
Active User
Joined: 02 Jan 2009 Posts: 115 Location: Hyderabad
|
|
|
|
Hello,
I have searched the forum and tried the whole day to achieve this. But couldn't. Request your inputs on how to achieve this.
I have a input file
Code: |
AA00
AA01
AA03
AA05
AA09
ZZ00
BB00
BB03
BB09
ZZ01
|
Position 1,2 is KEY/account #, position 3,4 is the rec type. ZZ is trailer record for the group. I can have min of 1 record in the group and maximum of 5 records. Can we resize them into 20 byte record length ?
Code: |
AA00AA01AA03AA05AA09
BB00 BB03 BB09
|
If a specific record type is not present, it should insert spaces in between (ex in BB account record type 01 and 05 are not present). Trailer records can be skipped.
I tried icetool with resize option. But because of tolen(20), it is giving the trailer records also though I am trying to exclude trailers in CTL1.
Code: |
RESIZE FROM(CATCH1) TO(SEND2) TOLEN(20) USING(CTL1)
//CTL1CNTL DD *
INCLUDE COND=(4,1,CH,EQ,C'0',OR,
4,1,CH,EQ,C'1',OR,
4,1,CH,EQ,C'3',OR,
4,1,CH,EQ,C'5',OR,
(4,1,CH,EQ,C'9',AND,1,1,CH,NE,C'Z'))
/*
|
I also tried grouping them when begin=(4,2,ch,eq,c'00',and,1,1,ch,ne,c'z').
But I am unable to insert spaces if a specific record type is not present.
Any inputs would be of great help. |
|