How to set on/off a group of indicators in a single statement?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sulthan
I cannot recollect completely. I will explain with an example.
C MOVE '00000' *IN(21).
this will set indicators from 21 to 25( total 5 zeroes from
21) to 0's.
Note: It is MOVEA or MOVE, not sure.
Is This Answer Correct ? | 2 Yes | 5 No |
what is a rpg?
can we perform CHAIN operation on Subfile record format....?
in a cl pgm records are copied to a file in qtemp a pgm is called to delete records from the file in qtemp no of records in file in library qtemp is checked wat shud be the count of records let say it was 10 initially endpgm
HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?
Can we create 300 logical files based on a single physical file using the CRTLF command only once?.
how do u track msg in cl pgm???
How can we receive values from a called procedure in RPG?
why we do STRSRVJOB in batch debugging in as400
can you debug ile rpg program using isdb?
Suppose my file has 10 fields and I want to make the 2nd field zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?
HI,1: What is the function of 'SETON LR' AND '*INLR=*ON ? 2:Can we used "seton lr" OR "*INLR = *ON" in between the program code ? 3:if yes then according to there function the code which is written acter seton lr/ *inlr should not be execute . Can any one tell me why those code get executed ?
how to find whether a date format is valid or not in RPG400 not in RPGILE.Can you please write the coding for this sir,i'm new to AS400.Please help.