Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 8500

DFSORT/ICETOOL :: RE: Add PD field from 2nd file to PD in 1st

$
0
0
Author: Sushant Garje
Posted: Thu Dec 01, 2016 7:33 pm (GMT 5.5)

I tried the below control card to get the addition part.
Now the problem is that the output I receive is in ZD format and the file is longer than expected.

Control Card:
Code:

//SYSIN    DD *                                               
  JOINKEYS FILE=F1,FIELDS=(1,8,A,28,3,A)                     
  JOINKEYS FILE=F2,FIELDS=(1,8,A,28,3,A)                     
  REFORMAT FIELDS=(F1:1,30,F2:1,30)                           
  OPTION COPY                                                 
  OUTFIL FNAMES=SORTOF01,BUILD=(1,16,17,8,PD,ADD,47,8,PD,25,6)
/*                                                           


Expected output was 30 bytes long same as input file and with the Amount field containing the addition of the Amount fields from File 1 and File 2 for the matched records only.
For unmatched records, the record from the input File 1 is supposed to be as it is copied to output file.
But as you can see below, the output file created is 38 bytes long with the amount field taking up the additional 8 bytes.

Code:

----+----1----+----2----+----3----+---
ABCDANT XYZJE          12349522    HKD
ABCDANT XYZJE          79934401    USD
EFGHK   UVWNDAK        22900302    USD
IJKLAM  RSTKUR          5465503    HKD
MNOPN   OPQANI        876587703    AUD


Note:
- The addition of the packed-decimal values is correct
- The unmatched records are getting skipped from the output.
_________________
Sushant G


Viewing all articles
Browse latest Browse all 8500

Trending Articles