Interview questions:
1.What are different types of files?
CPT files (equipment history)
Which uses high amount of transaction data.
DFLT functions
CRTOBJ
DLTOBJ
CHGOBJ
REF files(setup files with interface code and type)
CRTOBJ
DLTOBJ
CHGOBJ
SELRCD
EDTFIL
STR
2.Different types of file relations ?
OWNED BY
REFERS TO
3.What are the 4 database functions ?
4 INTERNAL functions CRTOBJ,DLTOBJ,CHGOBJ,RTVOBJ
4.Different role of paramters
MAP
RST
POS
1.What is the maximum length of parameter could be passed to a functions .
9 if more than 9 use array or a file.
2.I am creating a new function and only want CRTOBJ to be created what to do?
F7 option on the function
5. Create an array and want to use it what is the precaution to use?
How do we call non-synon function from synon program?
If I use same 2 programs in a program what happens?
2 subrotuines will be created.
What are the user points in EDTFIL , SEL RCD?
Which functions doesn’t have user points?
EXCEXTFUN
It can have user defined user points .
Which function needs return code to be defined explicity?
EXCEXTFUN
EXCINTFUNC
What are internal functions ?
They are meant to be used within a external function or any other function with
object name like diplay file, edit file. Internal functions are like common
subroutines which are created to be shared among different programs.
EXTUSRSRC
user-written high-level language source code is to be included within the source code generated by a
calling function.
EXTUSRPGM
Return code needs to be set explicitly.
You cannot specify Neither (N) type parameter for this function type; however, you may specify
Varying (VRY) role parameters
Types of Role.
1. R - Restricted. Function will read access path to find exact matching record.
2. M - Map. Function will read access path from the beginning.
3. P - Position. Function will read access path to find closedst matching record.
Types of Usage.
1. I - Input. Parameter will be passed as input.
2. O - Output. Parameter will be used as output means this "Display racing
results" function will return value in this parameter.
3. B - Both. Parameter will used to pass value and return value both.
4. N - Neither. Parameter will not be used.
5. D - Drop. Parameter is dropped and can not be used.
How do you create a file in synon.
YSTRY2 hrmdl command use cheyyandi
also make sure
X1SY, X2SY, HRGEN, HRMDL added to libl
What happens if a pgm is called twice in synon program?
2 subroutines will be created.
* Check Horse is a Sire(M) - Horse for giri *
C EXSR SARVGN
* Check Horse is a Sire(M) - Horse for giri *
C EXSR SBRVGN
Type of context fields in synon?
File transfer SFTP
KANBAN BOARD IS USED
JIRA
Tools used are :
IMPL
ALDON
TURNOVER
Topics to be prepared
PF
LEVEL CHECK ERROR
SQLRPGLE
DEBUG
SERVICE PROGRAMS , MODULES
ACTIVATION GROUPS
Previous interview questions:
How to access member of a particular file.
OPNQRYF
CHGPF
DFTACTGRP
TYPE OF ARRAYS
DATA STRUCTURES
WHAT IS ACCESS PATH
PRINT FILES
CL
Types of errors in CL
COMMAND LEVEL
PROGRAM LEVEL
What is signature erroe
How to add field to a FILE
Error handling in RPGLE
*PSSR
ON ERROR
CONSTRAINTS IN PF
ACCESS MEMBER OF A FILE
IF A JOBS GOES INTO MSGW ,what are all the options
CHGPF
SUBSYSTEM
WRKSYSSTS
Why subsystem? To dividie the allocation of resources.
How job goes into QBATCH or QINTER subsystem?
JOB into QUEUE WRKJOBQ
SUBSYSTEM(PROCESSING THE JOB)
OUTQ
WHY OUTQ
Initially as400 desgined to print everything.
PHYSICAL FILE
Access member of a physical file.
Add fields to a file.
OPNQRYF
CHGPF *MAP *DROP
INTERVIEW QUESTIONS
PART-1
1-How SFLSIZ and SFLPAG differs with all 3 types of Subfiles?
SFLPAG number of records on page.
Types of subfiles :
single page , SFLPAG= SFLSIZ no limitation on SFLSIZ size
LOAD SFLPAG number of records on screen and when page down we are clearing buffer.
load all SFLPAG<SFLSIZ SFLSIZ 9999
, xpandable SFLPAG<SFLSIZ SFLZSIZ 9999
LOAD SFLPAG number of records on screen and when page down we are not clearing
buffer.subfile is growing
2-How to identify whether any job is interactive or batch in CL, in RPG and normally?
Jobs with status BCH and INT USING Command WRKACTJOB TYPE COLUMN
In CL –RTVJOBA , check for parameter TYPE value 0 means batch and vaue 1 interactive
In RPG API QUSRJOBI field QUSJT04 which contains value for job B batch I interactive.
3-How will I explicitly open a file in RPG program?
USROPN in Fspecs %OPEN(F1) , %CLOSE(F1)
4-How do you set pointer to some value or its next or higher value?
SETGT in RPG
5-How can we execute a job in AS400?
SBMJOB
6-How can we translate values from lower to upper in RPG and Embedded SQL in RPG?
%XLATE
Upper function in SQLRPGLE.
7-How can we write and read a value using DSPF in CL program?
SNDRCVF command in CL ,
8-How to check end of file in CL?
Mon msg CP0864 for EOF
9-Can u update a database file in CL?
No UPDATE OR INSERT
We can use OPNQRYF
10-How do u monitor the message in CL?
MONMSG MSGID(CPF0000)
11-What is CA and CF and difference between them?
Answer:
CA-COMMAND ATTENTION like F12 to exit.
COMMAND FUNCTION passes values from one screen to another.
Like F6 to add
12-What can we done from O specs in RPG?
Report design
Insert records in a file
13-What is *PSSR?
Program status sub routine
System exception handling invoked automatically when error occurred.
14-Why we use *INLR = *ON?
Is an indicator set explicitly
To free rsoucesor memory like variables, files
15-What we called the program variable used with embedded SQL?
HOST VARIABLES
16-How to find dependent of a file in AS400?
DSPDBR
17-What is the length of the variable in DCL VAR(&VAR1) TYPE (*CHAR)?
Default length for a variable is 32
18-What is the length of the variable in DCL VAR(&VAR2) TYPE (*DEC)?
Default length is 15.5
19-What is the disadvantage of a global variable in AS400?
Accessing of varialbes globally outside procedures and result in garbage value
20-How can we avoid using indicators in RPG?
BY USING BIF
%FOUND, %EOF , %NOTEOF
PART-2
1-Which library gets loaded first when we login to IBM i?
2-How to see all the objects in library and its size?
Rklib and take 12
3-How to check all members of a file?
dspdbr
4-How to see all record formats used in a file?
dspfd
5-How to change the record size of a PF?
chgpf
6-Why we use USROPN keyword in RPGLE?
To open file explicitly
7-Why we use EXTMBR keyword in RPGLE?
EXTMBR(‘MEMBERNAME)
EXTMBR(‘ALL)
8-What is the purpose of using Varying? D Var1 S 10A Varying /Free Var1 = 'HELLO'; /End-Free 9-
What is CPF4131?
DYNAMICALLY ALLOCATON OF LENGTH
10-Difference between CRTDUPOBJ and CPYF command?
11-Mandatory keywords for subfile?
SFLCTL
SFLDSP
SFLPAG
SFLSIZ
SFL
12-Difference between PLIST and KLIST?
PLIST – all parameters
KLIST – LIST OF KEYS
13-Difference between *INLR = *ON and RETURN?
INLR
FREE VARIABLES OR RELEASE RESOURCES
CLOSES FILE
CLEAR MEMORY
14-What is the effective use and side effects of *INLR? How to overcome the side effects? Example
use case scenario?
AGAIN FILE HAS TO BE OPENED , ASSIGN OF VARIABLES
Activation group
RCLLAIM IN activation group
Ends all program running in activation group
15-What operations we can perform on Indicators?
SETOFF(0) and SETON(1)
16-How to check if a record is locked in RPGLE?
*STATUS FIELD IN INFDS 01218
17-How can we execute a CL command from within RPG program without calling a CL program?
QCMDEXC API
SYSTEM C API
QCAPCMD
18-Can we use a file with same file and record format name in RPGLE?
No, BUT THIS CAN BE DONE BY REMANMING THE RECORD FORMAT IN FSPECS
19-What are those commands which can only be executed in CL program but not in RPG program?
RTV* which retrieves some value cannot be used in RPG
20-How to retrieve RRN value of the file record in RPGLE?
INFDS IN SPECS DECARE RRN IN
PART-3
1-What is the maximum length of a variable name in CL program?
2-How can we display data from a flat file?
3-Difference between READC and SFLNXTCHG?
4-Difference between ITER and DO?
5-Difference between RENAME and PREFIX?
6-How to debug a job which is in MSGW state?
7-How do u pass parameters in CL program?
8-What is a Spool file?
9-What does EXFMT does?
10-What is the default data type of DS subfields in RPGLE?
11-What is the default data type for decimal 0 in PF?
12-Difference between Packed and Zoned decimal?
13-Difference between DOW and DOU loop?
14-How do u read a DSPF and Database file in CL program?
15-How do u declare more than one file in CL program?
16-How do u declare a file with graphic fields in CL program?
17-Why we use %SST in CL program?
18-Difference between SFLPAG and SFLSIZ?
19-Is module executable?
20-Can we call a module?
ILE Concepts
SERVICE PROGRAM
BINDER LAGNUAGE
STRPGMEXP
SINGATURE
ACTIVATION GROUP