Built-in functions

35 pts.
Tags:
MOVEA
RPG
Is there any built-in functions available to set on/off a group of indicators in a single statement. Usually we do that by MOVEA operation but how to do the same by using built-in functions?
ASKED: July 24, 2008  12:06 PM
UPDATED: July 25, 2008  2:37 PM

Answer Wiki

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

You can use %subarray buil-in function in order to do what you want to. This function is for accessing part of an array. You know that the indicator data structure can be handle as an array, then you can say:

%Subarray(*IN:70:6) = *On; (Free Format)

It means: “Turn on 6 indicators starting with 70th”.

In fixed format you just have to put this code in the factor 2 with an EVAL operation Code.

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
  • Gilly400
    Hi, I guess you could also use %replace to replace all the 1's with 0's or the other way around. Regards, Martin Gilbert.
    23,730 pointsBadges:
    report
  • Cwc
    Ideally, you could eliminate the usage of the numbered indicators in new programs, since named indicators are a much clearer way of communicating the program logic, without someone having to dig to figure out what last turned on *IN80, etc. This particularly helps those who are used to other languages such as .Net to understand RPG and to realize it has become a modern language and is not "legacy" (such an overused term today). Even with display files, there is a way to map the numbered indicators to named indicators, so that the program is much easier to read and understand the flow.
    4,290 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