Logical Relationship in Input Specs in RPG

165 pts.
Tags:
Logical operations
Logical Relationship in Input Specs in RPG
RPG
RPG logical operators
Hi, We can use operators AND/OR (in position 16:18) to specify logical relationship for Record Identification codes of an input record. I understood in what cases we use AND operator, but I couldn't understand in what cases one can use OR operator. I would be highly thankful if someone can help me in understanding this with a practical example. Thanks in advance. Regards Shruti.
ASKED: May 3, 2009  11:59 AM
UPDATED: May 6, 2009  7:06 AM

Answer Wiki

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

Hello,

Think as the ‘OR’ the same as either. If either the first <b>or </b>second statement is true than process. One statement can be false but as long as the other statement is true. They both can be true but if both statements are false, then the else is processed.

Did this make sense?

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
  • Yorkshireman
    Record Identification codes? Oldtech eh? lets say you have a file where byte 1 is the type of ... account 1= sales 2 = purchase 3 = nominal and you want a list of all sales or purchase accounts ID = 01 when byte 1=1 OR byte 1=2 calcs.. if 01 then print else ignore
    5,520 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