Write a program to display prime numbers between 1 to 100 using RPGLE.
D N S 2P 0 INZ 0
D Q S 2P 0
D R S 2P 0
D I S 2P 0
C PARM N
MOVE 2 I
DOU I >= N
I DIV N Q
MVR R
IF R=0
“Number is not PRIME” DSPLY
ENDIF
ADD 1 I
ENDDO
IF N=I
THEN
“Number is PRIME” DSPLY
ENDIF
C SETON LR
Is This Answer Correct ? | 3 Yes | 2 No |
To check the locks , we use cmd WRKOBJLCK , but how we confirm whether it's objeck lock / member lock. I confused with the Lock type and Status values...Can any body please tell me ...
If there are 1000 member(PGM type) in a SRC file. How can we compile in a CL program? ( It need to be done in a loop)?
1..Write an sql query to find the employee name who is having 2 phone numebr? 2.Write an sql query to the the second highest salary of the employee?
what is mean by *MAP and *DROP?what commands use these two keywords?why are they used?
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
How can we receive values from a called procedure in CL?
1.How to read a subfile in out put mode? 2.what are the keywords used to share same file? 3.using composite key which rpg code used?
How do you do indexing in a 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...........
Program to read marks of 10 students for 4 subjects and compute and display total marks and status of each student in rpg
difference between CHAIN and READE?
How can we find out whether the job is interactive or Batch through RPG program? 2) How can we find out through CL program?