DATA-INTO and ALWBLANKNUM

Discussions relating to the ScottKlement.com port of the open source YAJL JSON Reader/Generator. This includes the YAJL tool as well as the YAJLR4, YAJLGEN, YAJLINTO and YAJLDTAGEN add-ons from ScottKlement.com. http://www.scottklement.com/yajl/
Post Reply
emhill
Posts: 43
Joined: Thu Jul 29, 2021 1:15 pm

DATA-INTO and ALWBLANKNUM

Post by emhill »

I have a process that has been working for a while but the provider has suddenly decided (in some instances) to show resulting numeric fields that are zero as "". For example:

"netTotalCreditDollars": ""

When before it was "netTotalCreditDollars": 0

They have done this in the past and corrected the issue but I have this control spec in my program:

ctl-opt dftactgrp(*no) EXPROPTS(*ALWBLANKNUM);

I thought that would have handled it. Is that not the case? Here are my control specs:

Code: Select all

ctl-opt dftactgrp(*no) EXPROPTS(*ALWBLANKNUM);
ctl-opt bnddir('QC2LE':'YAJL');               
And here is my data-structure:

Code: Select all

dcl-ds CLAIMPROCESSEDRECORD dim(100);            
  TRACKINGNUMBER varchar(10) inz('');            
  REPAIRORDERNUMBER varchar(8) inz('');          
  PRODUCTSERIALNUMBER varchar(20) inz('');       
  CLAIMNUMBER varchar(20) inz('');               
  MODELNUMBER varchar(15) inz('');               
  REPAIRORDEROPENDATE varchar(10) inz('');       
  DELIVERYDATE varchar(10) inz('');              
  PRIMARYFAILEDPARTNAME varchar(25) inz('');     
  PRIMARYFAILEDPARTNUMBER varchar(20) inz('');   
  CLAIMSTATUSCODE varchar(3) inz('');            
  CLAIMSTATUSCODEDESCRIPTION varchar(20) inz('');
  CLAIMTYPE varchar(2) inz('');                  
  EXCHANGERATE varchar(10) inz('');              
  PREVIOUSCREDITAMOUNT packed(10:2) inz(0);      
  PARTCREDITTOTAL packed(9:2) inz(0);            
  PARTMARKUPTOTAL packed(9:2) inz(0);            
  LABORCREDITTOTAL packed(10:2) inz(0);          
  NETITEMCREDITTOTAL packed(9:2) inz(0);         
  NETTOTALCREDITDOLLARS packed(9: 2) inz(0);     
  REQUESTEDTOTALDOLLARS packed(9: 2) inz(0);     
  DIFFERENCETOTALDOLLARS packed(9: 2) inz(0);    
  DOCUMENTNUMBER varchar(20) inz('');            
  
This is the JSON that is getting the error:

Code: Select all

            "trackingNumber": "M023444489",
            "repairOrderNumber": "R336205A",
            "productSerialNumber": "6511747863",
            "claimNumber": "AT0520867",
            "modelNumber": "3414RHS",
            "repairOrderOpenDate": "2022-07-26",
            "deliveryDate": "2021-03-04",
            "primaryFailedPartName": "ECU Recalibration",
            "primaryFailedPartNumber": "400",
            "claimStatusCode": "50",
            "claimStatusCodeDescription": "Denied",
            "claimType": "01",
            "exchangeRate": "1.0",
            "previousCreditAmount": 0,
            "partCreditTotal": 0,
            "partMarkupTotal": 0,
            "laborCreditTotal": 313.75,
            "netItemCreditTotal": 36,
            "netTotalCreditDollars": "",
            "requestedTotalDollars": 450.15,
            "differenceTotalDollars": "",
            "documentNumber": "",
If they have a value they are represented correctly:

Code: Select all

            "trackingNumber": "M023445044",
            "repairOrderNumber": "345661",
            "productSerialNumber": "6610550609",
            "claimNumber": "AT0526774",
            "modelNumber": "4500RDS_P",
            "repairOrderOpenDate": "2022-09-09",
            "deliveryDate": "2019-06-25",
            "primaryFailedPartName": "BODY-VALVE, MAIN, 6SPD",
            "primaryFailedPartNumber": "29557154",
            "claimStatusCode": "40",
            "claimStatusCodeDescription": "Approved",
            "claimType": "04",
            "exchangeRate": "1.0",
            "previousCreditAmount": 0,
            "partCreditTotal": 260.75,
            "partMarkupTotal": 52.14,
            "laborCreditTotal": 715.35,
            "netItemCreditTotal": 46.24,
            "netTotalCreditDollars": 1074.48,
            "requestedTotalDollars": 1074.49,
            "differenceTotalDollars": 0.01,
            "documentNumber": "9900197704",
Am I missing something on the *ALWBLANKNUM value or somewhere else?

Thanks!!!!
jonboy49
Posts: 200
Joined: Wed Jul 28, 2021 8:18 pm

Re: DATA-INTO and ALWBLANKNUM

Post by jonboy49 »

Like you I would expect that to work. You do have the runtime PTF for this installed right?

One solution (if this is an urgent production issue) is to change the definition of the field(s) in question to alpha and then manually convert them to numeric where you could use MONITOR to trap conversion errors. This was the approach IBM used to recommend for XML-INTO and the situation is basically the same.
emhill
Posts: 43
Joined: Thu Jul 29, 2021 1:15 pm

Re: DATA-INTO and ALWBLANKNUM

Post by emhill »

Hey Jon,

I've got an email in to the provider to see why that got changed. I think I will have to do as you suggest and work around it. It may get fixed but it also might crop up again.

Thanks for the prompt response!!!!!

By the way (just for grins) do you know off hand what the runtime PTF you mentioned?
jonboy49
Posts: 200
Joined: Wed Jul 28, 2021 8:18 pm

Re: DATA-INTO and ALWBLANKNUM

Post by jonboy49 »

No and I can’t look it up right now but the RPG Cafe has it listed
Scott Klement
Site Admin
Posts: 636
Joined: Sun Jul 04, 2021 5:12 am

Re: DATA-INTO and ALWBLANKNUM

Post by Scott Klement »

You can find the PTFs here -- though, I don't see why you'd want to install the PTF numbers from 2020 -- just install the current ones then you'll have all of the new features and fixes.
https://www.ibm.com/support/pages/node/6342819
Post Reply