arithmetic expression in DISPLAY command



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

arithmetic expression in DISPLAY command

Postby durgam4 » Tue Jul 15, 2014 9:33 pm

Hi ,
I would like to do arithemetic calculations in DISPLAY command. is it possible.

DISPLAY FROM(SMFTOUT) LIST(SYSLIST)
HEADER('POF# ') ON(81,04,BI)

I want
A = VALUE OF( 81,04,BI)

DISPLAY FROM(SMFTOUT) LIST(SYSLIST)
HEADER('POF# ') ON(A+16,04,BI)

is it possible in ICETOOL?
durgam4
 
Posts: 9
Joined: Fri Jun 25, 2010 4:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: arithmetic expression in DISPLAY command

Postby BillyBoyo » Tue Jul 15, 2014 10:36 pm

It is not really clear what you want. Can you give some sample input and expected output for that sample? Also describe in words what you are trying to do, the requirement you are trying to fulfil, not how you've decided to attempt it.

The answer to the above is probably No, but can't be sure, and there may be another to do what you want.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: arithmetic expression in DISPLAY command

Postby durgam4 » Tue Jul 15, 2014 10:47 pm

Hi Billy, thanks for replying.

INPUT file is SMFTYPE 30 Records.
let A = (77,4, BI) ( from 77th position 4 bytes binary)
assume it contains a value 904
Now I want to display
HEADER('POF# ') ON(A+16,04,BI)
i.e HEADER('POF# ') ON(904+16,04,BI)
i.e HEADER('POF# ') ON(920,04,BI)
durgam4
 
Posts: 9
Joined: Fri Jun 25, 2010 4:59 am
Has thanked: 0 time
Been thanked: 0 time

Re: arithmetic expression in DISPLAY command

Postby BillyBoyo » Tue Jul 15, 2014 11:30 pm

Well, No, you can't do that. You'd have to pre-process the file so that it contained an extended field with the result of your calculation. You could do a COPY with a USING(....) prior to your DISPLAY, or do it in a SORT step using OUTFIL reporting features, so you only read the input once.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post