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

can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?

2 Answers   TCS,


how do I play {insert rpg system here}?

0 Answers   IBM,


What is the length of Signature?

3 Answers   UST,


How to get only unique records from a file which contains duplicate data using CPYF command ? Example : FILEA has duplicate records and FILEB is a UNIQUE defined.... and I want to get the data from FILEA to FILEB by eliminating all the duplicate records...

1 Answers  


1. What is bound-by-call and bound-by-reference? 2. Where and why is *Nomain used? 3. What are the difficulties faced by programmers when using service programs? 4. Explain the different ways of parsing and compiling XML in iSeries.

2 Answers  






In single page subfile,if I select the mutiple options in 1 page and without pressing enter,I press rollup key (pagedown).In such case how I can handle it in rpg becasue in single page we have to handle it in pgm. It would be helpful if any one answer with coding

4 Answers   Infinite Computer Solutions,


Write the subfile logic program for the given concept. Load the data to the subfile depends upon the designation where designation is not a key field?

2 Answers   TCS,


Can a run time array be declare like below with no specified number of elements ? Is it possible ? DFLD_ARRAY 7 DIM() INZ(*blanks) What does this mean ? Does this mean that the number of array elements will be dynamically declared during run time ?

1 Answers   TCS,


1.Write code to read the records from a file and load an array of size 99? Make sure that you take care of all the error conditions?

2 Answers   HSBC,


Hi guys, anybody know How RPG/400 code can be converted to RPG IV code with a single command?

1 Answers  


How to declare the more than one file in cl/400.

13 Answers   IBM,


Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg

0 Answers  


Categories