1.WHAT IS WRONG WITH THE CODE BELOW?
C CUSTNO CHAIN CUSTMAST
IF %ERROR

can any body find the wrong please?

2.What builtin function will you use to achieve the
following functionality?
C QTY IFLT *ZERO
C QTY MULT-1 QTY
ENDIF

Answers were Sorted based on User's Feedback



1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST ..

Answer / ajit

C CUSTNO CHAIN CUSTMAST
IF %ERROR

1) The position is incorrect.
2) If you mistakenly wrote incorrect position, then for %ERROR, you should use CHAIN(E).
3) Use EVAL %ABS(Name of the variable) for 2nd Q.

Is This Answer Correct ?    7 Yes 1 No

1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST ..

Answer / jaijo

1. CHAIN(E)has to be used and not chain.

2. %abs

Is This Answer Correct ?    5 Yes 1 No

1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST ..

Answer / ved dubey

1. The Position of opcode if is not valid...
2. %ABS can be used instead of this code

Is This Answer Correct ?    3 Yes 1 No

1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST ..

Answer / naveen chandra joshi

%error should nto be user with Chain opcode. %Found()/% Not
Found() is used with Chain opcode.

Is This Answer Correct ?    4 Yes 2 No

1.WHAT IS WRONG WITH THE CODE BELOW? C CUSTNO CHAIN CUSTMAST ..

Answer / syam

A1. C CUSTNO CHAIN(E) CUSTMAST
A2. QTY = %ABS(QTY * -1)

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More RPG400 Interview Questions

how to check on which PF , the LF is dependant ?

4 Answers   IBM,


We have a Physical file, after reading 5 records,it has to read LF of that same Physical file,Will it start reading from Ist record or will start reading from 5th record?

5 Answers   Hexaware,


Hi friends, Can you give the solution for the below mention simple code.and explain.what is output D CHR1 S 4A INZ('PEN') D CHR2 S 10A INZ('MYGET') D CHR3 S 8A INZ('GOOD') D CHR4 S 22A INZ C MOVEL CHR1 CHR4 C MOVE CHR2 CHR4 C EVAL CHR4=CHR3 C MOVE CHR1 CHR4

4 Answers  


What are the necessary keywords required to code a message subfile?

3 Answers  


1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.

4 Answers   HCL,






Hi,Please give me complete code with this logic. The question is how to read the records from a file with load an array of size with error condition? (The logic is Z-Add 0 IDX *LOVAL SETLL FILE READ FILE 99 *IN9 DOWEQ *OFF IDX ANDLT 99 ADD 1 IDX MOVE FIELD ARR,IDX READ FILE 99 ENDDO)please give me complete code with explanation?

1 Answers  


Setps to create .csv file on IFS folder in AS/400( V4R3)....?

3 Answers   TCS,


during execution, an rpg/400 program automatically follows a sequence of operations for each record that is processed. The built-in program cycle includes the following logical steps.

0 Answers   IBM,


Hi friends, I am using a load all subfile , and currently i am in in the third page of the subfile , from third page i have selected a record and called some other program .on returning, subfile is being loaded from the frist page. so can any one kindly suggest me in retaining my third page after returning. i.e loading from third page.

7 Answers  


explain sflclr, sflend, sfldlt, and sflcsrrrn?

0 Answers   IBM,


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

3 Answers  


1. If my rpg program has a date field, What extra care I have to take while compiling that RPG program? 2. If the file is keyed and I have declared the file as well as Key list properly in my program. Still am getting an error message like "Chain/reade operation is not allowed" What may be the case?

6 Answers   Virtusa,


Categories