How to set on/off a group of indicators in a single statement?
Answer Posted / david lex
Both are correct, but if you're using free form, move will
NOT work (since it's not supported).
d dsInds based( *in )
d iErrNameFirst 20 20n
d iErrNameMid 21 21n
d iErrNameLast 22 22n
d iErrNameSuff 23 23n
d errorsName 4a overlay( dsInds : 20 )
/free
// reseting a subgroup of indicators
errorsName = *all'0'; // All indicators OFF
errorsName = *all'1'; // All indicators ON
// reseting the entire indicator structure
dsInds = *all'0';
dsInds = *all'1';
*in( * ) = *off;
*in( * ) = *on;
/end-free
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
what is program status data structure?
during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.
What is the difference between iter and do?
What is the difference between copybooks and subprocedures in as400?
If my rpg program has a date field, what extra care I have to take while compiling that rpg program? If the file is keyed and I have declared the file as well as key list properly in my program. Still am getting an error message like "chain/reade operation is not allowed" what may be the case?
Interviewer asked me write down DDS for load all subfile .can anybody write dds
is this a rpg channel?
What is the purpose of record level identifier?
how do I preserve and clean the array?
How can we know running job is batch or interactive?
How Chain operation copies the record's data to the input buffer for the program?
How to define data area in RPG program? In which scenario multi occurrence DS is use in AS400?
What is ment by record level identifier?
what happens when sflsiz = sflpag? What are the advantages and disadvantages?
what is the use of sflnxtchg?