1.Where we declare Variables in RPG/400,RPGIV,RPGILE.?
2.When do we use D-spec and I-spec in real time ?.what is
difference between them?



1.Where we declare Variables in RPG/400,RPGIV,RPGILE.? 2.When do we use D-spec and I-spec in real t..

Answer / krocks

Ans 1 : We declare all our variables in D spec. Generally D spec comes after F spec on top of RPG program, but you can declare anywhere in your program.

Ans 2 : I-Spec and O-Spec are concept from RPG III, where one need to declare different variables for input and output. In D -Spec in RPG IV you need to declare only 1 variable for input and output.
I,O Spec used for RPG life cycle, printer file output etc...

Is This Answer Correct ?    1 Yes 3 No

Post New Answer

More RPG400 Interview Questions

How to change the name of physical members Dynamically?

1 Answers  


How to find d key field of a pf that doesn’t have source physical file?

2 Answers  


Hi, Can any body tell me ur experience on this questions? Questions: 1.what is the use of SFLRCDNBR other than subfile page display? 2.Which of the following operation cannot be used in conjuction with a file coded as device type disk?

1 Answers  


How to index LF by relative record no (RRN)

1 Answers  


what is an online rpg?

0 Answers   IBM,






This is my Physical file 'EMPS' existing in library "TAMIL1" and its record format is 'EMPRCD" a)its source is R EMPRCD ENO 4 0 ENAME 10 EADD 10 b)The records present in EMPS are as follows ENO ENAME EADD 0001 tamil coimbatore 0002 kumar bangalore 0003 sunder bangalore 0004 arunkumar chennai 0005 pandi hyderabad 0006 santhosh hyderabad 0007 sasi salem 0008 kalai chennai 0009 suresh hyderabad 0010 vijay bangalore 0011 Arul chennai 0012 velu chennai 0013 khan bangalore 0014 praba chennai 0015 praba.p coimbatore 0016 anand ooty 0017 raja erode 0018 sankar erode 0019 vadivel namakkal 0020 anbu chennai 0021 Ajith mumabi c)now i want to select the 'ENAME' field records starting with 'S' for that i have created a RPG program its source code is PGM DCLF FILE(TAMIL1/EMPS) DCL VAR(&MYENO) TYPE(*CHAR) LEN(4) OVRDBF FILE(EMPS) SHARE(*YES) OPNQRYF FILE((TAMIL1/EMPS)) QRYSLT('ENAME *EQ %WLDCRD("S *")') READ: RCVF RCDFMT(EMPRCD) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)) CHGVAR VAR(&MYENO) VALUE(&ENO) SNDUSRMSG MSG(&MYENO) SNDUSRMSG MSG(&ENAME) SNDUSRMSG MSG(&EADD) GOTO READ END: CLOF OPNID(EMPS) DLTOVR FILE(EMPS) ENDPGM Is this coding correct sir,the program gets compiled,and if i call it it says query running but records are not displayed.please help me out

4 Answers   Virtusa,


what is the difference between the procedure and module in ILERPG?

4 Answers  


how can an indexed file be used as arrival sequence in RPG?

3 Answers   IBM,


what is kids-rpg?

0 Answers   IBM,


wat is scan and check ? give me real time scenarios where we used these keywords in ur projects?

2 Answers   Four soft,


How to read alternative records in a pf by using rpg?

8 Answers   IBM,


When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?

5 Answers   Mphasis,


Categories