arsload not handling character removal / defaults properly -- aka ARS1129E

Previous topic - Next topic

Justin Derrick

Hey everyone.  :)

I'm indexing a report with a standardized header used for a dozen different report types.  The problem is, for a subset of those report types, one of the date fields isn't populated.  And that would normally be fine, but arsload doesn't appear to be using the default value I've specified, even when I feel it should be.

When the field is empty, and I don't do any character removal, I get:

ARS1129E Row 1: The string "        " could not be converted to a date from the format of %m/%d/%Y.

Fine.  It found some spaces where there should have been some numbers.  So I changed the Application configuration under the 'Load Information' tab to remove all leading, trailing, and embedded spaces.  So I run the report again, and I get:

ARS1129E Row 1: The string "" could not be converted to a date from the format of %m/%d/%Y.

So it's done the right thing in terms of character removal, resulting in a blank/null/zero-length value.  I would expect that when faced with a null value, that CMOD would substitute the default value, and load the data.  No such luck.

I'm kinda out of ideas for this.  I was thinking of adding a field mask for the date value, but I suspect it would just cause indexing to fail immediately when it doesn't find data matching that mask.

Any assistance would be greatly appreciated, as always.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Greg Ira

What I've done in those cases is use a trigger on that field.  Use one of the "/" for the trigger.  Then I tie the field to that trigger.  CMOD will use the default when it can't find the trigger but not when the field is formatted wrong.

Justin Derrick

Quote from: Greg Ira on September 30, 2015, 05:47:36 PM
Use one of the "/" for the trigger.  Then I tie the field to that trigger.

The snag is that the date format provided in the report is 12311999 (MMDDYYYY) without slashes.  I suppose I might be able to trigger off the '20' in the year... 

Am I wrong in thinking that character removal resulting in a null should use the default value is the 'more correct' behavior?

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Greg Ira

Definitely agree.   If there's nothing there it should take a default instead of making us go through these contortions.

Greg Ira

Just a thought.  If you're on MP maybe you could use a regular expression in the trigger to catch (or not catch) the date: REGEX=�[0-9]{8}� ?

Justin Derrick

This came up again today, and I like your RegEx idea.  I'll give it a shot and report back.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Justin Derrick

Annnnnnd...  Regex support is only available in CMOD v9.5 and newer.  Doh.

So I'll keep digging.

-JD.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR