RPGLE Build in function (BIF)

pts.
Tags:
RPG
It is imposable for me to set the length of Variable-Length Field D ServUser S 30A VARYING D IDLenth S 3i 0 C Eval %Len(ServUser) = IDLenth After this statement length of field ServUser still is 30 pos long. In Debug mode I get the message CPF7E2B: Type compatibility error occurred. Thank you for helping. Igor Kreymer

Answer Wiki

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

I think you can’t set the size of that field. It gets input like a string of 5 chars. At that time the field will be 5 big. Why would you do this, with the %Len BIF?

Discuss This Question: 1  Reply

 
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
  • TomLiotta
    What is the value of IDLenth at the time of execution? Are there multiple definitions of ServUser? Tom
    125,585 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