CL Parameter Problem

465 pts.
Tags:
AS/400
AS400 Hex Invalid data
CL Parameters
iSeries
net.data
Hello All, I have a Net.Data macro that calls a CL program to do some processing. We have two iSeries: Dev and Prod Using the same code on Dev as is on Prod, the production CL program is getting the parameter values a different way. When you put the programs into debug, Here's what one of the parameters look like: Parameter - 20 char Value coming in - 'AGRI OTHER' DEV Hex value: C1C7D9C940D6E3C8C5D940404040404040404040 Prod Hex value: C1C7D9C940D6E3C8C5D900000000000000000000 So, aparently our production box is treating zeros differently. Any Ideas?

Software/Hardware used:
V5R4M0, iSeries
ASKED: January 22, 2010  3:54 PM
UPDATED: July 15, 2010  2:46 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

The difference isn’t zeros, but the trailing blanks and nulls. Your DEV box is putting trailing blanks (hex 40) after the ‘AGRI OTHER’ value, while the PROD box is putting trailing null (hex 00) values. I can’t say why they are being treated differently, but you may want to try passing the value as <pre>”AGRI OTHER ” vs “AGRI OTHER”</pre>. By including the trailing blanks within the quotes you should see the trailing blanks on both machines.

Discuss This Question: 7  Replies

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Dcantwell
    Well, that is actually how it's being passed. That's the confusing part. I don't actually trim any of the trailing blanks as I'm passing it to the CL program. Inside of the CL program i use TCAT and BCAT to strip off the blanks as needed... Thanks for the suggestion though!
    465 pointsBadges:
    report
  • Dcantwell
    Sorry I didn't explain that originally! That's my fault.
    465 pointsBadges:
    report
  • Dcantwell
    I don't know why it was working on one box and not the other, but I did fix the problem. Using your idea, I made sure the spaces were filled in using a "PADDING" function in my front end language. Thanks for your help! Dave
    465 pointsBadges:
    report
  • ElTerrifico
    You're welcome. Glad I was able to help. It is odd though that it works on one machine and not the other. Wish I could help you figure that out. My only thought there would be to check release and ptf levels.
    620 pointsBadges:
    report
  • BigKat
    also check the server configurations -- perhaps there is a different "default" setting between the Dev and Prod boxes as to pad or not (or what to pad with - blank or null)
    7,585 pointsBadges:
    report
  • Qbjgqbjg
    I had a similar issue passing a parameter that was longer than the data it contained. It was fine in the passing program but in the called program the trailing blanks turned into nulls. It was the last parm in the list. So, I added an extra parm at the end of the list in the calling program. I just added ' ' (a blank) . It worked perfectly. There is something about the last parameter that can be a problem.
    40 pointsBadges:
    report
  • NullFields
    I don't know specifics around how the .NET macro passes it's parameters, but the IBM i manual at this link (page 233 of document, 243 of pdf) might offer some insight: http://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/topic/rbam6/rbam6.pdf
    880 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following