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 |
can anyone explain aboutovrOVRDBF,OPNQRYF, OVRSCOPE and OPNSCOPE?
Can we create 300 logical files based on a single physical file using the CRTLF command only once?.
steps for debugging two rpg programs????
what is the necessary command needed before OPNQRYF and why?
Whether a module can consists of many procedures or it can consist of subprocedures having a main procedure?If it is possible that it can contain many individual procedures than can we have different name for complete module and how do we call this module in main modul?
You have a *USE authority on a Library and *All authority on a file in that Library.Can you change the data in that file?
How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program
parameters cannot be passed in which one???
How can read PF in reverse order (end to start) in CL pgm..
3 members in a databasefile .how to read records from all the members?????????
What is the significance of UDATE?
program to find the number of objects used in a given program through a display.