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 to select highest score of each subject or how to select highest income of every month?

1303


1. If there are two programs using same file and 2 users are using the file at the same time and what can be done to allow them both to access? 2. How can remove lock from the file for accessing it by both users?

507


How can we know running job is batch or interactive?

666


How many program bind in one module....

2134


can anybody help me to solve this problem. the program that i m checking display error message saying "Record format for file AJDSPFFD does not match model file and decimal error. how to solve this problem. The AJDSPFFD is snapshot the AJTLOG that is the audit trail list.

2287






What is ment by record level identifier?

668


what do you mean by an input subfile, what are the keywords required?

787


can I touch the array during treatments?

767


which program rpg or cl is efficent to update a transaction onto a database file and why ?

751


what is the necessary keyword needed to scroll subfile records?

711


How Chain operation copies the record's data to the input buffer for the program?

1094


can you debug ile rpg program using isdb?

748


what is kids-rpg?

679


what is a rpg?

709


how do I preserve and clean the array?

683