Joined: 24 Feb 2010 Posts: 3 Location: Colleyville, TX
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?
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 binary 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
Joined: 24 Feb 2010 Posts: 3 Location: Colleyville, TX
Thanks for your reply SKolusu. I've gotten further, but am still struggling with converting a binary value to the decimal equivalent in the output record. Here's what I have in the input file.
I want to convert the binary value in columns 5-8 to decimal and overlay that value at offset 855. Using the parse command, I can get halfway there. I need to translate %02 from 0000002F to 0000047.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Code:
...
855:%02,BI,TO=ZD,LENGTH=7,
...
I answered your question about this on ibm-main also.
I don't really understand why you're using PARSE here. It doesn't seem like you need it since the fields are fixed, not delimited. You could just use 5,4 instead of %01 and 9,4 instead of %02.
Joined: 24 Feb 2010 Posts: 3 Location: Colleyville, TX
Thanks Frank and Skolusu. To answer your question about why I'm using PARSE, I didn't know any better. I was looking for some opportunity to solve my problem and ran across PARSE. Akin to over-egging the cake.