IBM AS400 RPG Interview Questions, Answers, and Explanations.What is Logical File?
Answer : A Logical file is an Access path to the Physical File.
How can you specify no duplicate key?
Answer : By defining the unique key.
What is the command to know how many LF are related to a PF?
Answer : DSPDBR (Display Database Relationship)
What is the command to know key fields of file?
Answer : DSPFD (F4) *ACCPTH(Access Path).
What is a Join Logical File?
Answer : A join Logical File can be built over the two PF’s, with the PF’s ‘joined’ by a common key value. It is available for read access.
Can a Join Logical File be updated?
Answer : No.
Using DFU, user will be able to ___________ from Physical File?
Answer : Add/Update/Selected or all fields.
What is the difference between normal UPDDTA to PF and updating using DFU program?
Answer : Both are same only difference is DFU allows you to add or change selected fields.
What is Library?
Answer : A library is a system object that serves as a directory to other objects or collection of object
What is Library List?
Answer : A job’s library list defines the path of libraries that the job follows when trying to locate programs, files or other As/400 objects.
Difference between Source Physical File & Physical File?
Answer : Source Physical File contains members who contain source statements & Physical File contains members, which contain data.
What is the object type of PF, LF, Printer file & Display file?
Answer : *File
What are the different methods to access SEU?
Answer : Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU Through Program Development Manager (PDM)
Which are the member types which SEU supports?
Answer : RPG, CL, PF, LF, PRTF & DSPF.
In which Specs Arrays, Tables & Constants are defined?
Answer : In I Specs.
What is a Spool File?
Answer : Printed output items placed in an output queue are known as spooled files.
How many Specs are there in RPG & Which are they?
Answer : There are 7 Specs in RPG they are H, F, E, L, I, C & O.
What is the difference between GOTO & EXSR?
Answer : EXSR is a conditional branching while a GOTO is an unconditional branching.
Difference between CA & CF?
Answer : CA: - It does not retains the value into the buffer memory. CF: - It retains the value into the buffer memory.
What does EXFMT does?
Answer : Write & Read.
What does the OVRDBF command do?
Answer : It overrides the PF temporarily for a job.
How does the RUNQRY show the output?
Answer : RUNQRY shows the output always in RRN (Relative Record Number) & not in keyed sequence.
How many printer files maximum can be used in single RPG program?
Answer : 8 because of the overflow indicators OA-OG & OV.
When you are defining a flat file in your program in F Specs which format will you specify?
Answer : Flat File: - F (Fixed Length) Other File: - E (Externally Described)
Difference between skip before & space before?
Answer : Skip before leaves the specified no. of lines moving to the next page while Space before leaves the
specified no. of lines on that page.
Which indicator is used for Read?
Answer : EQ (Equal to)
How many types of display are available on As/400 for user interaction?
Answer : 4 Types they are Entry, Menu, Information & List Display.
Which is the Primary Editor of As/400? Source Entry Utility (SEU).
What are the basic features of SEU?
Answer : Prompt depending upon type, shows right hand side date & left hand side the line number.
Which are the figurative constants used in RPG?
Answer : *ZERO,*BLANK, *ZEROS, *BLANKS, *HIVAL, *LOVAL, *OFF, *ON & *ALL.
What is the syntax for PLIST?
Ans:*ENTRY PLIST PARM
What are indicators?
Answer : Indicators are inbuilt class of variables for RPG.
What is CAB?
Answer : It compares Factor1 with Factor2 & if condition is true, control is transferred to label designated in the result field. The label
specified must appear as the Factor1 of a TAG operation somewhere in the program.
Which are the Relational Operators in RPG?
Answer : GT, GE, LT, LE & EQ.
In ‘O’ Specs what is the opcode for write?
Answer : EXCPT.
What does LOKUP does in Tables & Arrays?
Answer : The LOKUP opcode searches the Factor1 entry in table or array.
File Access Opcodes?
Answer : READ, SETLL, SETGT, READE, READP, READPE CHAIN, KLIST, KFLD, EXCPT & WRITE.
What is RPG Fixed Logic Cycle?
Answer : A logic the compiler supplies is called RPG Fixed Logic Cycle.
Difference between Interactive & Batch Job?
Answer : Batch job begins, runs & continues to execute instructions without human intervention or control while
Interactive job are user driven.
How can we run a Batch Job?
Answer : SBMJOB Command.