AS400 Interview questions and answers part18

This article contain AS400 interview questions.
AS400 Interview questions and answers part18, ibm i , as400 interview question, ibm i interview questions, interview question, rpg developer questions, cl interview question, as400 and sql tricks, ibm i, as400, iseries, system i,  chain, reade, crtdupobj,setll, setgt, crtdupobj. cpyf,wrkactjob,goto,exsr,dsppfm, readc,PARM in CL, activation group in ibmi as400, primary file vs. fully procedural file in rpg as400,DEFN, *LIKE, *NAMVAR,EXFMT, journal in ibmi as400, I-specs in rpg, CA and CF in DSPF as400
AS400 Interview questions and answers part18

Q1: Why do we use SETLL operation in RPGLE?

Answer 1:

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?

Answer 2:

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?

Answer 3:

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?

Answer 4:

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?

Answer 5:

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?

Answer 6:

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?

Answer 7:

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?

Answer 8:

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?

Answer 9:

Use the PARM keyword in the CL to pass parameters.

Q10: What is the difference between a primary file and a fully procedural file?

Answer 10:

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?

Answer 11

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?

Answer 12:

In I-SPECS arrays, tables and constants are defined.

Q13: What is a journal?

Answer 13:

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?

Answer 14:

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?

Answer 15:

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.

Post a Comment

© AS400 and SQL Tricks. All rights reserved. Developed by Jago Desain