|AS400 Interview questions and answers part18
Q1: Why do we use SETLL operation in RPGLE?
SETLL is used to check whether a record exists in a file or not. When we used SETLL on any file with either the key or RRN value then it sets the pointer next to that record or equal to that record.
Q2: Why do we use SETGT operation in RPGLE?
The SETGT operation positions a file at the next record with a key or relative record number.
Q3: What is the difference between CRTDUPOBJ and CPYF?
CRTDUPOBJ command will create an object either with full data or no data whereas the CPYF command can be used to copy full or a subset of records by using RRN, Key values, INCCHAR, INCREL. For more information please refer to the Difference between CRTDUPOBJ and CPYF command in AS400.
Q4: Which command is used to display all active jobs?
WRKACTJOB command is used to display all active jobs. For more information please refer to the WRKACTJOB command in AS400.
Q5: Difference between GOTO and EXSR?
EXSR i.e. Execute Subroutine is a conditional branching and GOTO is an unconditional branching.
Q6: Which command is used to display the contents of a database file?
The Display Physical File Member (DSPPFM) command displays the contents of a database file.
Q7: Which RPG operation retrieves a changed record from a subfile?
The READC operation retrieves a changed record from a subfile.
Q8: Which activation group is automatically deleted when the last program in the call stack ends?
The default activation group is named the non-ILE activation group. Every job has a default activation group and it will automatically be deleted when the last program in the call stack end.
Q9: How do you pass parameters in CL?
Use the PARM keyword in the CL to pass parameters.
Q10: What is the difference between a primary file and a fully procedural file?
The Primary file uses RPG logic to read a file sequentially and they will automatically read from the first record to the last record while the Fully Procedural file is used to read a file as per our requirement and we can use the multiple opcodes like READE, READP, READ , etc. with the fully procedural file in RPG.
Q11: What is the purpose of a declarative statement DEFN?
DEFN opcode depends upon factor 1 values like *LIKE, *NAMVAR. *LIKE DEFN in factor 1 defines a new variable or field which is the same as the old field and *NAMVAR in factor 1 associates new data area and data structure in the RPG program.
Q12: In which specs arrays, tables, and constants are defined?
In I-SPECS arrays, tables and constants are defined.
Q13: What is a journal?
Journal is an object on IBM i and this object holds changes like update, delete, and add happened to the data that gets recorded in an object known as a journal.
Q14: What does EXFMT do?
Write and then read operations simultaneously are performed by the EXFMT opcode in the RPG program.
Q15: What is the difference between CA and CF?
CA stands for Command Attention Key which does not read values from the variables of the screen whereas CF stands for Command Function Key which read values from the screen.