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 |
Suppose we add one field in physical file and this physical file is used by several programs.how do we know which program is using that file? What are the impact analysis.
can we perform CHAIN operation on Subfile record format....?
What is the Record Address file. How can we use it in RPG program?
what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?
Hi,This is raju.Can any body give me the real experience answer for this question? 1.What is the significance of *MAP and *DROP in the CPY command?
We have job which is running as batch. It takes atleast 06 hours to complete tht job. But I wanna do tht job with in 3 hours?
Can an indexed file be accessed in arrival sequence in RPG?
what is the necessary keyword needed to scroll subfile records?
How to update physical file in rpgle without using display file?
how can we find setll setgt chain read reade readp operations are successfull or not,give example.explain in detail.
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?
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?