How to set on/off a group of indicators in a single statement?

Answers were Sorted based on User's Feedback



How to set on/off a group of indicators in a single statement?..

Answer / prabahar

MOVEA '00000' *IN(41)

Is This Answer Correct ?    8 Yes 1 No

How to set on/off a group of indicators in a single statement?..

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

How to set on/off a group of indicators in a single statement?..

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

Post New Answer

More RPG400 Interview Questions

what is a rpg?

0 Answers   IBM,


can we perform CHAIN operation on Subfile record format....?

4 Answers  


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

2 Answers  


HOW TO DELETE THE RECORD FROM MASTER FILE WHICH IS LINK BY ANOTHER TRASATION FILE WITH REFERTIAL INTYGRITY?

1 Answers   TCS,


Can we create 300 logical files based on a single physical file using the CRTLF command only once?.

8 Answers  






how do u track msg in cl pgm???

1 Answers   CTS,


How can we receive values from a called procedure in RPG?

1 Answers  


why we do STRSRVJOB in batch debugging in as400

1 Answers  


can you debug ile rpg program using isdb?

0 Answers   IBM,


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?

1 Answers  


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 ?

2 Answers  


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.

2 Answers   iGate,


Categories