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


Please Help Members By Posting Answers For Below Questions

How do u design a physical file, when you have 2 Unique fields like for eg in A student file student ID and student examination no both are unique

548


Explain mdt?

665


what is a rpg?

701


How to create a login screen using a command instead of display file.... intention is to get a password field on a command..... how do you achieve this...

1312


give an eg of ACQ-(ACQUIRE),BIT OFF,BIT ON,DEALLOC,DUMP,FEOD,FORCE,MHHZO,MHLZO,MHLLZO,MLHZO,REL,RESET,TESTZ,TESTB,TESTN----GIVE SMALL EXAMPLE TO THE OPCODES...TO UNDERSTAND FUNCTIONING...........

3286






How to select highest score of each subject or how to select highest income of every month?

1295


When we have a file with Duplicate records and I want to read the unique record from the file. For example a file containing Emp Name as 'Ram' and there are 3 entries of it. So how to read a unique record from File?

509


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

716


how do I preserve and clean the array?

675


what is program status data structure?

1388


what happens when sflsiz = sflpag? What are the advantages and disadvantages?

709


thanks mr.Harshad R Suryawaunshi,i'm new to as400 i think you are telling in rpgile i know only rpg400 if possible can you tell in rpg400

1895


what was the robotech rpg?

684


When it is desirable to describe files Internally?

1188


What is the purpose of record level identifier?

728