can any body correct the following code?
Following a procedure which returns the maximum of two
numbers.Correct the following code.
P GETMAX B
D GETMAX PI
D NUM1 35 0
D NUM2 45 0
C IF NUM1 > NUM2
C RETURN NUM1
C ELSE
C RETURN NUM2
C ENDIF
P GETMAX E
Answer / vijay
to send a return value, you have to defined the return variable in front of PI which actually contain the return value the code should be as follows
P GETMAX B
D GETMAX PI 45 0
D NUM1 35 0
D NUM2 45 0
D rtnfld 45 0
C IF NUM1 > NUM2
C Eval rtnfld = Num1
C ELSE
C Eval rtnfld = Num2
C ENDIF
C Return rntfld
P GETMAX E
| Is This Answer Correct ? | 7 Yes | 1 No |
what is batch debug in as400?
why subproc not run in dftactgrp?????/plz explain
difference betwen keywords and opcodes
WHAT IS MENT BY RECORD LEVEL IDENTIFIER ? WHAT IS THE PURPOSE OF THIS?
Errors in Sql query will be in which state?
Can we found a record existance in a file w/o reading the file?
6 Answers Traitsys Technologies,
How to find d key field of a pf that doesn’t have source physical file?
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...........
can any body correct the following code? Following a procedure which returns the maximum of two numbers.Correct the following code. P GETMAX B D GETMAX PI D NUM1 35 0 D NUM2 45 0 C IF NUM1 > NUM2 C RETURN NUM1 C ELSE C RETURN NUM2 C ENDIF P GETMAX E
What is the compilation option that has to he specified while compiling an RPC program which uses a file having date data type field?
i'm working on progA , in that program i want to see the userids of the users who work on this program?
how to display all the members records in a physical file without using ovrdbf?