Indicators in AS400

5 pts.
Tags:
AS/400
I have the code;

50  leave

N50 xxxxxxx

where 50 is the indicator. If 50 sets on, then executes leave operation.

What is use of N50?



Software/Hardware used:
As400

Answer Wiki

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

In the described case ‘N50′ can be left out. Maybe this coe is clearer to understand:<pre>if *in50;
leave;
else;

endif;</pre>

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

Logically, there is no point to having N50 on the line. The line should never be reached unless 50 is off, so there is no logical reason for having the N50. (“N50″ means indicator 50 is “not” on.)

It is possible that the N50 line was in the program from the beginning, and the 50 line was added later. When the 50 line was added, the programmer could have removed “N50″ but forgot to do so or chose not to make changes that weren’t absolutely required.

Or the programmer was simply unsure how indicators worked.

Regardless, when the 50 line LEAVEs the block of code, the N50 condition doesn’t have to be specified.

Tom

Discuss This Question: 2  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
  • ASWDEVELOPER
    some programmers put in the redundant N50 as a sort of documentation ...
    405 pointsBadges:
    report
  • filuphaze
    That is what comment lines are for.
    475 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