OPNQRY Question

15 pts.
Tags:
AS/400
CLP
RPG
RPGLE
Answer Updated
ASKED: February 19, 2007  3:20 PM
UPDATED: January 2, 2010  1:09 AM

Answer Wiki

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

Instead of one apostraophe in the value of the skunumb, use two:

Instead of Tim’s, use Tim”s.

=============================================================

Whenever input comes from a user, it must be validated. Process the input to handle any invalid or improper characters. Also, if a command returns an exception, it needs to be handled. The exception (the error message) will indicate what the problem is.

A quote in a variable might or might not need to be doubled up. If it’s simply one character in a string of characters, then that’s all it needs to be. But if the string is to be handled as a quoted string, then each quote in the string needs to be doubled.

The doubling acts as an escape character so that the quote in the string isn’t interpreted as being the end of the string.

Tom

Discuss This Question:  

 
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

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