Jeff Jones wrote:
>I've built an ICETOOL job to overlay an offset in a VB file with a
>literal.  This works great.  I also have another requirement to place
>a derived value at another offset in the output file.  Can ICETOOL do
>this?
>
>Here are the requirements...
>
> SORT FIELDS=(5,28,BI,A)
> RECORD TYPE=VB,
> OPTION COPY
> OUTREC IFTHEN=(WHEN=(5,4,BI,NE,X'4B4B4B4B',AND,
>   9,4,BI,GT,X'00000000',,
>              AND,13,1,BI,EQ,X'20',AND,
>   19,8,BI,EQ,X'4040404040404040'),
>        OVERLAY=(19:C'JUNKSITE'))),
>
>----+----1----+----2----+----3----+----4-----------------------------------------
>JEFF.........!        98103107592300.....
>DCCC000220000544444444FFFFFFFFFFFFFF00000
>1566000F00003A000000009810310759230000000
>
>The ICETOOL control cards above will identify this record, and overlay
>column 15 with JUNKSITE.
>
>I also need to populate offset 841 with a derived name, using this
>model.
>
>PWC.aaaa.#nnnnnnn.N
>
>where aaaa = columns 1-4 (JEFF in this example)
>      nnnnnnn = the decimal translation of the hex value stored in
>columns 5-8 (in this example x'0000002F' = decimal 0000047.
>
>So the derived name that I want to place at offset 841 is
>
>PWC.JEFF.#0000047.N
>
>Any help you can provide is appreciated.

It wasn't clear if you wanted to do the OVERLAY for the same record or for
a different record.  Assuming it's the same record, you can use this
modified
DFSORT OUTREC statement:

 OUTREC IFTHEN=(WHEN=(5,4,BI,NE,X'4B4B4B4B',AND,
   9,4,BI,GT,X'00000000',
              AND,13,1,BI,EQ,X'20',AND,
   19,8,BI,EQ,X'4040404040404040'),
    OVERLAY=(19:C'JUNKSITE',
     845:C'PWC.',5,4,C'.#',9,4,BI,EDIT=(TTTTTTT),C'.N'))

Frank Yaeger - DFSORT Development Team (IBM) - yae...@us.ibm.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration

 => DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to