kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12380 Topics: 75 Location: San Jose
|
Posted: Fri Dec 21, 2007 11:10 am Post subject: |
|
|
Quote: |
Kolusu,
I executed the code in the above link but it did not give what OP wants.
|
Vkphani,
Please read the comments in that solution posted by me. I gave link to a generic solution for records of 80 bytes. OP just needs to customize it for 10 bytes which is quite simple and he will get the desired results. Please try to understand the job before you decide to simply say it does not work.
vkphani wrote: | I don't think it is possible to achieve what you want in single step. |
The solution posted by me is indeed a single step solution. Here are the control cards specifically for 10 byte records.
Code: |
//STEP0100 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD *
AAAAAAAAAA
11111111
BBBBBBBBBB
22222222
CCCCCCCCCC
33333333
//OUT DD SYSOUT=*
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) WITHEACH -
ON(021,8,CH) -
WITH(012,08) -
KEEPNODUPS USING(CTL1)
//CTL1CNTL DD *
INREC IFTHEN=(WHEN=INIT,
OVERLAY=(001:01,10,
012:01,10,
021:SEQNUM,8,ZD,START=2,INCR=1,
029:021,8,ZD,MOD,+2,TO=ZD,LENGTH=1),HIT=NEXT),
IFTHEN=(WHEN=(029,1,ZD,EQ,0),
OVERLAY=(012:08X,
021:021,8,ZD,SUB,029,1,ZD,M11,LENGTH=8)),
IFTHEN=(WHEN=(029,1,ZD,EQ,1),
OVERLAY=(001:10X,
021:021,8,ZD,SUB,029,1,ZD,M11,LENGTH=8))
OUTFIL FNAMES=OUT,
OUTREC=(001,19)
/*
|
Krisprems,
What happens if the 9th byte is not a space? _________________ Kolusu
www.linkedin.com/in/kolusu |
|
krisprems Beginner

Joined: 13 Dec 2006 Posts: 101 Topics: 4 Location: india
|
Posted: Fri Dec 21, 2007 12:49 pm Post subject: |
|
|
kolusu, Quote: | Krisprems,
What happens if the 9th byte is not a space?
| my solution was based on the sample provided by kavi, which had space in 9th position....
also kavi stated that
Quote: | First record is of 10 bytes and second is of 8 Bytes. |
If it was not a space then i would ask kavi if there is any way to identify the alternative records, if not then i would have given the same solution as yours _________________ cHEERs
krisprems |
|