Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using ICETOOL to populate an output field with derived value

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
JeffJones

New User


Joined: 24 Feb 2010
Posts: 3
Location: Colleyville, TX

PostPosted: Thu Feb 25, 2010 7:42 pm    Post subject: Using ICETOOL to populate an output field with derived value
Reply with quote

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...

Code:
 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 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

PWC.JEFF.#0000047.N

Any help you can provide is appreciated.

Thanks,
Jeff Jones
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Feb 25, 2010 11:54 pm    Post subject:
Reply with quote

Jeff Jones,

You can use the following control cards. I modified your control cards to be more readable and easier to modify

Code:

//SYSIN  DD *
  SORT FIELDS=(5,28,BI,A)
  RECORD TYPE=VB
  OUTREC IFTHEN=(WHEN=(05,4,BI,NE,X'4B4B4B4B',AND,
                       09,4,BI,GT,X'00000000',AND,
                       13,1,BI,EQ,X'20',AND,
                       19,8,BI,EQ,X'4040404040404040'),
       OVERLAY=(19:C'JUNKSITE'),HIT=NEXT),

  IFTHEN=(WHEN=(05,4,CH,EQ,C'JEFF',AND,
                09,4,BI,GT,X'0000002F'),
  OVERLAY=(841:C'some value'))
//*
Back to top
View user's profile Send private message
JeffJones

New User


Joined: 24 Feb 2010
Posts: 3
Location: Colleyville, TX

PostPosted: Fri Feb 26, 2010 10:57 pm    Post subject: Reply to: Using ICETOOL to populate an output field with der
Reply with quote

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.
Code:

----+----1----+----2----+----3----+----4-
 ----------------------------------------
JEFF.........!        98103107592300.....
DCCC000220000544444444FFFFFFFFFFFFFF00000
1566000F00003A000000009810310759230000000


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.

Code:

SORT FIELDS=(5,28,BI,A)                               
RECORD TYPE=VB                                       
OPTION COPY                                           
OUTREC IFTHEN=(WHEN=(05,4,BI,NE,X'4B4B4B4B',AND,     
                     09,4,BI,GT,X'00000000',AND,     
                     13,1,BI,EQ,X'20',AND,           
                     19,8,BI,EQ,X'4040404040404040'),
       PARSE=(%01=(ABSPOS=5,FIXLEN=4),               
              %02=(ABSPOS=9,FIXLEN=4)),               
       OVERLAY=(19:C'JUNKSITE',                       
                845:C'PWC.',                         
                849:%01,                             
                853:C'.#',                           
                855:%02,                             
                863:C'.N             '))             



The results of the above sysin look like this in the output record.

The JUNKSITE overlay is good.
Code:

----+----1----+----2----+----3----+--
 ------------------------------------
JEFF.........!JUNKSITE98103107592300.
DCCC0002200005DEDDECECFFFFFFFFFFFFFF0
1566000F00003A14522935981031075923000


Overlay beginning at offset 841 is good except for the binary to decimal translation.
Code:

4----+----5----+----6----+----7----
 ----------------------------------
.PWC.JEFF.#.....   .N             
0DEC4DCCC47000244444D4444444444444
0763B1566BB000FB000B50000000000000


Thanks,
Jeff
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Feb 26, 2010 11:31 pm    Post subject:
Reply with quote

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.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Feb 26, 2010 11:36 pm    Post subject: Reply to: Using ICETOOL to populate an output field with der
Reply with quote

Jeff,

You really don't need a parse statement there , you can simply convert the binary value to Zoned decimal format

use the following control cards

Code:

SORT FIELDS=(5,28,BI,A)                               
RECORD TYPE=VB                                       
OPTION COPY                                           
OUTREC IFTHEN=(WHEN=(05,4,BI,NE,X'4B4B4B4B',AND,     
                     09,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.',                         
                849:5,4,
                853:C'.#',                           
                855:9,4,BI,ZD,LENGTH=7,
                863:C'.N             '))
Back to top
View user's profile Send private message
JeffJones

New User


Joined: 24 Feb 2010
Posts: 3
Location: Colleyville, TX

PostPosted: Sat Feb 27, 2010 3:04 am    Post subject: Reply to: Using ICETOOL to populate an output field with der
Reply with quote

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.

Thanks for your help.

Jeff
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts JES2 doesn't honor the priority of th... Aron Lendvai JCL & VSAM 7 Thu Jun 29, 2017 1:41 pm
No new posts Dynamic output file creation in cobol... smileheal COBOL Programming 7 Thu Jun 15, 2017 10:53 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us