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

1. I have2 records in a PF. READ PF DO DSPLY EMPNO RETRN DSPLY EMPNO ENDDO What was the output 2. SETON LR vs RETURN 3. Primary File 4. How to delete a deleted spaces 5. How to read a PF in reverse order in CL 6. I have a object in Lib A, B and C. But it shows in D Lib..Why? 7.

4 Answers   HCL,


Suppose i am having 3 programs PgmA,pgmB,pgmC and using source debugger. At debugging time i found that pgmC having some code error..then in debug mode directly how can i debug pgmC

2 Answers  


What is the purpose of FRCDTA keyword?

3 Answers   IBM,


A rpg or clp command to find if the file field is defined as a character or numeric field.

1 Answers   IBM,


Job is in MSGW while reading the input file and writing a new record / updating a reacod due to Duplicate data error. What action would you take ( C D I R )...?

4 Answers  






How do you code file / field renames in ILE RPG?

4 Answers   Accenture, IBM,


Set on command is used for closed all opened files , initialize var and release resource , return cmd is used for return to calling program but my req. Is dnt close opened files and resource must released while doing transactions , how can i do this...?

0 Answers  


Can we create 300 logical files based on a single physical file using the CRTLF command only once?.

8 Answers  


1.what are the ARITHMETIC EXPRESSIONS IN CL PGM? 2.How to PASSING PARAMETER TO CL PGM?

1 Answers   NetCracker,


How to write record if no field or the field are different in physical file in rpgle ?

0 Answers  


I have file with data as follows data 1 2 3 4 5 I need to read 1 and 5 ,then 2 and 4 then like.. upto end of file, can any one help on this

3 Answers   ISG,


how to change the length of the field in a physicalfile?

12 Answers  


Categories