Tuesday, August 20, 2013

Interview questions AS400



A program variable coded in an Embedded SQL statement is referred to as?
Ans:
Host Variable

Which of the CL command can be used to determine which logical files are dependent on a specific file?
Ans:
DSPDBR

What does DFU program you to do on a record?
Ans:
Insert, Update Delete & File Enquiry.

When are the Unique Constraints executed?
Ans:
During Insert.

When are the Referential Constraints executed?
Ans:
Insert, Update & Delete.

How many triggers can be associated with a file?
Ans:
6(Maximum)

Why is the Declare cursor statement is used for?
Ans:
To define & name the cursor & specify rows to be fetched.

What do we can do with the Embedded SQL statements?
Ans:
We can Insert/Update/Delete records, fetch records, fetch values from records into variables.

Which CL command is used to trap error messages during program execution?
Ans:
MONMSG

Which CL command can be used at program execution to redirect the file named in an RPG program?
Ans
:OVRDBF

What is the length of the variable in the given example?
Ans:
DCL VAR (&Name) TYPE (*Char)? Default 32 & for Decimal 15,5
We can determine weather a record is in use bye another user with the help of status code (*STATUS). If
*STATUS = 01218 i.e. record already locked.

How to write *PSSR ?
Ans:
It just similar to any other subroutine.
*PSSR BEGSR
………………
………………
…………….
ENDSR

What is Procedure ?
Ans:
A procedure is the set of self contained high level language statements that can perform a particular task and then returns to a caller.

What is Procedure Prototype and Procedure Interface.
Ans:

Procedure Prototype
In this section we specify the name of the procedure along with PR.
D PROC1 PR
Procedure Interface
It is section where we define all the parameter which are receiving or returning some values.
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0

How to define a procedure ?
Ans:

First we have define Procedure Prototype along with all parameter. And PR.
D PROC1 PR
Then define Procedure with Begin/End
Procedure Name Begin/End
P PROC1 B Export
Then define Procedure Interface along with parameter and PI
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0
Define all the parameters as a variable to the procedure
D PARMA S 5 0
D PARMB S 5 0
In not returnable procedure, the procedure should end with
C PROC1 E
In returnable procedure, it should end with
C RETURN PARMA + PARMB

How to define Global Parameter in ILE ?
Ans:
Declare a variable with key word EXPORT and while using this variable in anther program declare with
IMPORT keyword.

What is the disadvantage of using Global variable?
Ans:
We can not trace out at which point the value of variable is changed.

What is Service Program?
Ans:
A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.
A service program differs from a program in two ways:
It does not contain a program entry procedure. This means that you cannot call a service program using the CALL operation.
A service program is bound into a program or other service programs using binding by reference.

What is the structure of Service Program ? What is signature ?

What is *ISO date format?
Ans:
YYYY-MM-DD for other formats refer to IBM manual or ERIS document.

If we tried to move year part of *ISO date into a field of length 3, what will happen ?
Ans:
Program crashes, as in case of *ISO format it required fields of 4,2,2.

How to avoid using indicators in ILE ?
Ans:
By using the standard Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…etc.
Display / Printer File

Explain the keywords EDTCDE & EDTWRD
Ans:

EDTCDE & EDTWRD are key words used for formatting purpose. EDTCDE cannot be applied to Character filed. And EDTCDE has some Codes pre-defined for example,

EDTCDE(Z) – for suppressing the leading zero Y – for date field.
EDTWRD can be used to define user defined formatting for a fields.

Disadvantage of using Validity Check keyword? How to overcome these disadvantages ?
Ans:
If invalid values are entered,
The option filed is displayed in reverse image.
System defined message is displayed which may not be user friendly.
Keyboard is locked, we have to reset it.
To overcome above disadvantage validations is done within program and user friendly/defined message is displayed.

What are the important factors in Error message subfile ?
Ans:
We must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format is associated to a line number.

How to define to define a Hidden filed in DSPF ?
Ans:
Define a filed in a DSPF of use HIDDEN.(H)

How To get the cursor position?
Ans:
With the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of variable should be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.

What is OVERLAY?
Ans
:It allows a record format to be displayed on screen retaining the previous displayed record formats.

What key word is used when screen is re-display?
Ans:
RSTDSP is a parameter to be specified at compile time for display file.

Command Attention key and Command Function Key ?
Ans:
With the help of Command attention key we can pass only the indicator status to program not the data from screen. While command function key passes indicator status as well as a data from screen to program.

How to validate input values in Display file ?
Ans
:With the help of Validity check key words VALUE, RANGE, COMP

What is the stored procedure and how do you define a stored procedure.
Ans
:A stored procedure is a program that can be called to perform operations that can include both host language statements and SQL statements. Procedures in SQL provide the same benefits as procedures in a hot language. That is, a common piece of code need only be written and maintained once and can be called from several programs. Stored procedures can be used in both distributed and non-distributed applications.

It is defined using DECLARE PROCEDURE statement, syntax is as below…
EXEC SQL
DELCARE P1 PROCEDURE
(:PARM1 INOUT CHAR(10))
(EXTERNAL NAME MYLIB/PROC1
LANGUAGE RPGLE
SIMPLE CALL WITH NULLS);
END-SQL
We can have parameters as IN , OUT , INOUT type. Language can be RPGLE, C, CL, etc.. MYLIB/PROC1 this PROC1 is a program written and compiled separately and it is of language which you are specifying in section LANGUAGE.
Using Nested Select statement
SELECT * FROM FILE1
WHERE FILE1.FLD1 EQ (SELECT FILE2.FLD1 FROM FILE2)

How do you achieve referential integrity?
Ans:
By adding Referential Integrity Constraints to a Physical file or Logical file. Constraints like PRIMARY KEY, FOREGIN KEY, DELETE RULE, UPDATE RULE. ETC.
Commands are ADDPFCST for Physical file and ADDLFCST for Logical file.

Type of constraints
*REFCST - A referential constraint is being added
*UNQCST - A unique constraint is being added.
*PRIKEY - A primary key constraint is being added
*CHKCST - A check constraint is being added

Type of Delete rule (DLTRULE)
*NOACTION –

1. Deleting a record in parent file is permitted (not restricted) if data for a non-null parent key does not match data for a foreign key.
Deleting a record in a parent file is restricted (does not occur) if data for a non-null parent key matches data for a foreign key.
*RESTRICT –
Deleting a record in a parent file is permitted if data for a non-null parent key does not match data for a foreign key.
Deleting a record in a parent file is restricted if data for a non-null parent key matches data for a foreign key.

*CASCADE –
The cascade delete rule is used. Deleting a record in a parent file causes matching records in the dependent file to be deleted when data for a non-null parent key matches data for a foreign key.
Type of Update rule (UPDRULE)
*NOACTION – No Action

*RESTRICT –
Updating a record in a parent file is permitted if data for a non-null parent key does not match data for a foreign key.
Updating a record in a parent file is restricted if data for a non-null parent key matches data for a foreign key.

Where Stored procedure lies in the system.
Ans:
If we want to have a look where the stored procedure, we can have a look through SQL.
Select * from

Different type of Cursor?
Ans:
Two types of Cursor
Simple / Serial Cursor
A serial cursor is one defined without SCROLL key word

For serial cursor each row is fetched only once per OPEN
When it is opened it is positioned before the first row in the table.
To use serial cursor we have to re-issue OPEN

Scrollable Cursor which is defined with SCROLL key word.
Cursor defined with SCROLL key word
Rows of cursor can be fetched many times
When it is opened it is positioned before the first row in the table.
When the FETCH is issued , the cursor is positioned to the row of the table that is specified by the POSITION option. (FIRST, LAST, PREV, NEXT, RELATIVE)

Writing an SQL statement from selecting records from TWO files using single statement and Nested select statement.
Ans:
Using Single statement.
SELECT * FROM FILE1, FILE2
WHERE FILE1.FLD1 = FILE2.FLD1

Difference between View and Index ?
Ans:
View will not any data.. It only shows a data from table while Index has a Indexing Data for a sequence on which Index is created. View is similar to Logical file without having Key and Index is similar to Logical File having Key (as keyed logical file has access path data) Table is similar to PF.

Can we have records (with fields from more than one file) from multiple files and Nested / sub query in SQL ?
Ans:
Yes, we can have record from multiple file with join condition and we also can have nested query or subquery like SELECT * FROM FILE1 WHERE FILE1.FLD1 IN
(SELECT FILE2.FLD1 FROM FILE2)

What is the sequence when using CURSOR?
Ans:
Define Cursor ,Declare Cursor ,Open Cursor ,Fetch record ,Processing ,Close Cursor
Which are the four keywords supported by Program Status Data Structure?
Ans:
*STATUS, *PARM, *ROUTINE & *PROGRAM

Which are the String Manipulation Opcodes?
Ans:
TESTN, SCAN, CHECK, CHECKR, SUBST & CAT

DB2 is a type of Database?
Ans
:It is an Integrated RDBMS.

An access path may be in which sequence?
Ans:
It can be in Arrival & Keyed sequence

To change constant field defined on RLU screen which field level keyword should be used?
Ans:
DFT (Default)

Space & Skip are which level keywords?
Ans:
Field & Record

A Join Logical File has how many Record formats?
Ans:1

A Multiple format Logical File is also known as?
Ans:
Union File

How does Union file maintains Record formats?
Ans:
1 Record format for each PF

Records can be Read/Update/Deleted with which file?
Ans:
Simple Logical File & Physical File.

Which type of object is used in DB2/400?
Ans
:*FILE

What is SQL?
Ans:
SQL is an interface for programming language.

File level entry for a PF can be?
Ans:
UNIQUE & FIFO

What is the command to create FRF?
Ans:
CRTPF

Join Logical File displays data from how many files?
2 or more PF’s

A Query can be displayed without saving it?
Ans:
True

Which are the Query selection criteria, which can be given in a Query?
Ans:
LIST

To add a file to the ‘File Selection’ option of a Query, the function key to be pressed is?
Ans:
F9

A query can be run in which mode?
Ans:
Batch & Interactive

What is the values SQLCOD when there is an error in fetching the records specified in the select statement?
Ans:-
ve value

A file cannot have more than 1 unique key?
Ans:
False

DLCOBJ command is mandatory for removing lock on any object?
Ans:
False

What is a Journal?
Ans:
A Journal is an object used primarily to record changes to data in a PF.

Which are the DB2 tools to protect Integrity of the database?
Ans:
Journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.

What are the three types of keywords associated with printer file ?
Ans:
File level, Record level & Field level.

Difference between SFLRCDNBR and SFLNXTCHG
Ans:
SFLRCDNBR will give the RRN of the First record displayed on the screen at a given time.
Whenever a record is changed on display file. An MDT is set ON. If an indicator is associated with SLFNXTCHG and it is SETON then READC will read only the changed record. And if the indicator is not associated and it is seton it READC reads all the records from sub-file

How can see logical file based on which physical file and vice versa
Ans
:DSPDBR

How can u check no of records in a file
Ans:
DSPFD

How do u compile RPGLE program
Ans:
Either thru 15 or crtrpgmod

Is module executable
Ans:
No You need to create an RPG prog to run the module.

How do you combine two record formats in RLU ?
Ans:
Using CLC.
19.

What are the different commands used in RLU ?
Ans:
DR - Define Record, CLC - Change Line for Continuation, CLR - Change Line for Record, SD - Create Sample Data, VF - View Fields, NP - New Page, DC - Define Constants, DF - Define Fields, CF - Centre Fields & SP - Space Fields evenly.

What is the command used to invoke RLU ?
Ans:
STRRLU.

What are different record spacing keywords in RLU ?
Ans:
SKIPA, SKIPB, SPACEA & SPACEB.

Mandatory keywords of sub file
Ans:
SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words

What is procedure?
Ans:
A procedure is the set of self-contained high level language statements that can perform a particular task and then returns to a caller

What is service program?
Ans:

A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.
A service program differs from a program in two ways:
It does not contain a program entry procedure. This means that you cannot call a service program using the CALL operation.
A service program is bound into a program or other service programs using binding by reference
What is LOKUP opcode?
Ans:
Look’s for a particular element of an array

How many files, printer files you can describe in a RPG
Ans:
50 files and 8 printers

How do handle file exception/error
Ans
:*INFDS ,*PSSR defining it in F spec

Distinguish between terminating a program through SETON LR and RETURN?
Ans:
LR closes all the files used in the program and RETURN is used to return the control to the parent program.

How will you add a field to physical file already containing data?
Ans:
With CPYF command and *NOCHK & *DROP

What are the uses of FACTOR1, FACTOR2 and RESULT field for the RPG operation code PARM?
Ans:
It is add value of FACTOR1 to FACTOR2 or compare the value of FACTOR 2 with FACTOR1.

How will you find a string using PDM?
Ans:
By using FNDSTRPDM.

How will you search an array?
Ans
:LOKUP

What are the different types of arrays?
Ans:
Preruntime gets populated at the time input. Runtime gets populated at the time execution.Compile time gets populated at the time of compilation.

What is message file?
Ans:
It is file which contain messages created by the user through which a user can display own message while validating.

What does DEFN do?
Ans:
It is used to define a field based on the value specified in FACTOR 1.

What are two types of record are used in subfile?
Ans:
SUBFILE RECORD FORMAT and SUBFILE CONTROL RECORD FORMAT.

What are DDS required for SUBFILE?
Ans:
SUBFILE DISPLAY (SFLDSP) SUBFILE DISPLAY CONTROL (SFLDSPCTL) SUBFILE CLEAR (SFLCLR) SUBFILE SIZE (SFLSIZE) SUBFILE PAGE (SFLPAGE).

What is ELASTIC and NON ELASTIC SUBRILE?
Ans:
When subfile size is greater then subfile page size it is called elastic subfile and when subfile size is equal to subfile page size it is called non-elastic subfile.

What is SFLINZ and SFLRNA?
Ans:
SFLINZ stands for subfile initialize. It initialized all the character field as blanks and numeric fields as zeros. SFLRNA stands for subfile record not active (It means records are there in the subfile but active).

Can you display a empty subfile?
Ans:
Yes by using the keyword SFLINZ and SFLRNA.

Why do we use READC? What is SFLNXTCHG?
Ans
:READC is to read those records which have changed in the subfile. If you validate a record in subfile on some condition all the invalid records can display in reverse image. The first which have changed and made valid and released still displaying in reverse image. The records have read even it has not been changed due to SFLNXTCHG.

How do you read changed records backward in subfile?
Ans:
NOT POSSIBLE.

How you will find an error which is not in the first page of the subfile without using ROLLDOWN key?
Ans
:By using keyword SFLRCDNBR.

What is SFLROLVAL?
Ans:
By using this keyword you can tell system to roll on of records when the user presses ROLLDOWN key (For this you define a hidden of 4 byte).

How you will know whether you are in SFLDROP or SFLFOLD mode?
Ans:
By using the keyword SFLMODE.

How you get the relative record in a subfile in which cursor is located?
Ans:
By using the keyword SFLCUSRRN (Subfile cursor relative record number).

What is QCMDEXC?
Ans:
It is used to execute a single CL command within the RPG program.

What is OPNQRYF, MONMSG commands
Ans
:
It is Dynamically creation of access path, and it can have resultant fields i.e. if the expression is A = B + C then B and C are from the file while A is defined in OPNQRYF. We can divert the output of command to an OUTFILE. Command associated with OPNQRYF is CPYFRMQRYF to save the output permanently

It is a CL command to monitor and error/exception message so that in case of an error a dump is avoided and the control is in program. It is also used to monitor user message.
What are the different Opcodes available in RPG for Database access ?
Ans:
READ, CHAIN, WRITE, UPDAT, DELET, SETLL, SETGT, READE, READP, REDPE, OPEN, CLOSE, FORCE, NEXT, UNLCK.

How can database records be read without lock ?
Ans:
Put 'N' in position 53 of C specs.

What does CHECK opcode do ?
Ans:
The check operation verifies that each character in the base string (factor 2) is among the ` character indicated in the comparator string(factor 1).

In conjunction with which statements can ORxx and ANDxx conditions be used ?
Ans
:DOUxx, DOWxx, IFxx, and WHxx.

What does opcode POST do ?
Ans:
Puts information in INFDS.

Can you have multiple key lists for a single file ?
Yes.

What are the different types of arrays available in RPG ?
Ans:
Pre-execution time array.
Compile time array.
Execution time array.

Can we define Multi-dimensional arrays in RPG ?
Ans
:No.

What is XFOOT opcode ?
Ans
:Adds all the elements in a numeric array, and places the sum in the result field.

During input operation which indicator position is seton if there is a record lock?
Ans:
LO indicator position is seton.

What is the difference between *LIKE and *NAMVAR ?
Ans:
*LIKE defines the variables as in database.
*NAMVAR is used to define variables as data area.

What would be the effect on the field where reverse image, underline and highlight display attributes are active ?
Ans:
The result is same as if you had specified ND.

What is the purpose of OVRDTA and OVRATA keywords ?
Ans:
OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display.
OVRATA keyword (field or record level) can be used to override the existing display attributes of a field or record already on the display.

What keyword must be used with PROTECT keyword ?
Ans:
OVERLAY

What is RPG ?
Ans:
Report Program Generator.

Where will control be passed after the execution of the *PSSR subroutine if the factor2 of the ENDSR is blank ?
Ans:
Control will return to the next sequential instruction.

What is the maximum number of subfiles that can specified in a display file ?
Ans
:512

The maximum number of subfiles that can defined in a RPG program for one display file is ___ .
Ans:
24

The maximum number of subfiles that can be active for a single file is ____ .
Ans:
12

What are the different opcodes used for file operation on a subfile in a RPG pgm?
Ans:
READ, READC, CHAIN,UPDAT and WRITE

How will you display a particular page in subfile ?
Ans:
Move a valid relative record number(RRN) in the field specified using SFLRCDNBR keyword in DDS.

Can a single screen format occupy a screen area above and below a subfile format ?
Ans:
Not possible.

What is SFLPAG and SFLSIZ ?
Ans:

SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.
SFLSIZ : it is an attribute which specifies the number of records can be stored in the subfile.

How to pick up the changed records every time in a subfile after the first change made ?
Ans:
Seton SFLNXTCHG keyword indicator and update the subfile record.

How do you specify the number of records to roll in a subfile ?
Ans:
Use SFLROLVAL keyword in DDS along with the number, which specifies the number of records to scroll at a time.

What are the three line types in RLU ?
Ans:
Report line, Filler line & Sample line.

What is the function of RLU ?
Ans:
To design & prototype a report.
What is a library in AS/400 ?
Ans:
Library in AS/400 is an object that serves as a repository for other objects.

Name few IBM supplied libraries ?
Ans
:GPL, QTEMP, QUSRTOOL, QSYS, QRPG & QCBL.

What is a library list ?
Ans:
Library list that indicates libraries used for the process and the order in which it has to be
searched. System identifies it in *LIBL.

How many libraries can be there in a library list ?
Ans:
Total 40 (15 system and 25 application).
DDS - Data Description Specification.
Source Physical File contains the source for the various objects created. This file has a specific structure.
RPG, CLP, DSPF, PRTF, etc.
A-spec
UNIQUE, PFILE, REFFLD

What is the difference between Physical and Logical files ?
Ans:
Physical file contains data, where as Logical file serves as a access path to database.

What does the keyword UNIQUE mean ?
Ans:
Records with duplicate key values are not allowed.

What is FCFO, FIFO, LIFO in Database environment ?
Ans:
These are file level keywords which are used to access the records in the order
FCFO : First Changed First Out
FIFO : First In First Out
LIFO : Last In Fist Out

How many record formats can you have in a Physical file and in a Logical file ?
Ans
:Physical file can contain only one record format, Logical file can contain more than one record format.

What is Multi-format logical file ?
Ans:
Logical which uses fields from two or more physical files.

What is keyword PFILE specifies ?
Ans:
PFILE is used define the Physical file being referenced.

What is a Join Logical File, Can it be used for Update ?
Ans:
Logical file that combines more than one physical file.
Update is not possible through JLF.

Is it possible to join the same file to itself ?
Ans:
Yes.

What does SDA stands for ?
Ans:
Screen Design Aid.

What is the symbol used for defining a new field in SDA?
Ans:
'+'.

What is the symbol used for shifting fields in SDA?
Ans
:'<' , '>'.

What is the symbol used for copying & moving new field in SDA?
Ans:
Copying : '-' & '=='.
Moving : '-' & '='.

What is the symbol used to get name & length of a field in SDA?
Ans:
'?' .
*DATE, *TIME.

How can a screen field that has changed since the last output operation be detected ?
Ans:
Attach the MDT attribute to the field, to detect whether field has been changed as a result of user input.

What are the different types of specification available in RPG/400 ?
Ans:
Control Spec.( H )
File Spec.( F )
Extension Spec.( E )
Line counter Spec.( L )
Input Spec.( I )
Calculation Spec.( C )
Output Spec.( O )

Is it necessary to define all formats ? Which are mandatory and which are Optional ?
Ans:
No, all are Optional.

What is the use of E specification in RPG ?
Ans:
Extension Specs describes all record address files, arrays and tables.

In which specification can a report layout be defined ?
Ans:
O Specification.

How many files can be defined in F specs ?
Ans:
A maximum of 50 files.

Can an indexed file be accessed in arrival seQuence in RPG program ?
Ans:
Yes.

In which specification Data Structures can be defined?
Ans:
I - Spec.

When is a TAG statement used in RPG ?
Ans:
It is used as a Label.
Which of the following operations does NOT zero the field FLDA defined as 4,0?
Ans:

C MOVE *ZEROS FLDA
C Z-ADD *ZEROS FLDA
C Z-ADD 0 FLDA
C MOVE *ALL'0' FLDA
C SUB FLDA FLDA
C MOVE '0000' FLDA
C CLEAR FLDA
C MOVE *BLANKS FLDA
The last instruction does NOT zero the field FLDA.

How would you design the process for a nightly, high volume check producing process that needs to select only records that are flagged to be processed?
Ans:
With the help of OPNQRYF Clp command, we can select the records from the data base file. The process involves following steps:
Steps: 1. OVRDBF with SHARE (*YES)
2. OPNQRYF
3. CALL the program
4. DLTOVR
5. CLOF

How would you join 3 separate fields, a first name, middle initial and last name together as 1 field with proper spacing? You can describe in either RPG and/or RPG ILE (Integrated Language Environment)
Ans:

MOVE 'Dr. ' FNAME 3
MOVE 'JOHN' MNAME 4
MOVE 'WATSON' LNAME 6
FNAME CAT MNAME: 1 VAR1 8
VAR1 CAT LNAME:1 VAR2 15
DSPLY VAR2
MOVE *ON *INLR

When PGMA calls PGMB for the first time PGMB executes the *INZSR. PGMB uses the RETRN operation to return to PGMA. When PGMA call PGMB the second time is the *INZSR executed?
Ans:
If you specify RETRN in called program, the *INZSR will not execute again.

Show 2 ways to convert a date from YYMMDD to MMDDYY (MULT operation not acceptable)

1) CVTDAT DATE() RTNVAR( ) FROMFMT( ) TOFMT( )
Source code is required to convert from one date format to another date format.
The source code in CLP is given below:

PGM
DCL VAR(&VAR1) LENGTH(6) TYPE(*CHAR) VALUE('YYMMDD')
DCL VAR(&RCVD) LENGTH(6) TYPE(*CHAR)
DCL VAR(&VAR2) LENGTH(4) TYPE(*CHAR)
DCL VAR(&VAR3) LENGTH(2) TYPE(*CHAR)
CHGVAR VAR(&VAR2) VALUE(%SST(&VAR1 3 4))
CHGVAR VAR(&VAR3) VALUE(%SST(&VAR1 1 2))
CHGVAR VAR(&RCVD) VALUE(&VAR2 *CAT &VAR3)
SNDMSG MSG(&RCVD) TOUSR(*USRPRF)
ENDPGM

Define the purpose of Factor 1 the Operation Code and *IN15 in following code
HI LO EQ
C *YMD Test(D) yymmddDate 15
Ans:
If the factor 1 value matches with factor2 value, the indicator specified in EQ comes *ON.

Describe the function of SETLL operation in RPG language?
Ans:
The SETLL operation positions a file at the next record with a key or relative record number that is greater than or equal to key or relative record number specified in factor1.

Describe the function of SETGT operation in RPG language?
Ans:
The SETGT operation positions a file at the next record with a key or relative record number that is greater than key or relative record number specified in factor 1.

What is the purpose of Level Check parameter in a Physical file?
Ans:
Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program.

Define a Job Queue?
Ans:
Job queues are queues of batch jobs waiting to be processed.

Define a Output Queue?
Ans:
Output queues are queues of jobs waiting to be printed.

What is the function of CPYSPLF command?
Ans:
It copies the spooled file to the data base file.

What is the function of CPYF command?
Ans
:To copy the data from the one file to another.

What is the function of CRTDUPOBJ command?
Ans:
To create the replica from the original object.

Define Subsystem?
Ans:
Subsystem is nothing but it provides specialized environment to complete the execution of jobs.

What are different types of Substems?
Ans:
QBATCH, QINTER, QSPL, QCMN, QCTL, QBASE.

Define a Batch Job?
Ans:
* A user request the job.
* The job is created (job name is assigned, job attributes are allocated)
* The job is placed on a job queue
* The sub system QBATCH takes the job from job queue and starts it.
* Output generated by the batch job is placed on an output queue.
* The spool sub system prints the output on the output queue.

Describe about Query/400?
Ans:
Query/400 is a licensed program that uses a query to analyze and select the information contained in the data base files and create a query report.
A query report can be:
* displayed on a workstation (screen)
* printed
* stored in another database file.

What is the CLP command to access a Query/400?
Ans:
WRKQRY

What is the purpose of Overrides?
Ans:
The basic purpose of Overrides is to temporarily change the attributes of a file. So you don't have to create permanent files for every combination of attributes your application might need. Overrides gives you the flexibility to use existing model files and dynamically change their attributes.

Define Data Structure?
Ans:
Data structures are specified in the Input specifications of an RPG/400 program to define an area in storage and layouts of related sub fields.

What is the purpose of Data structure?
Ans:

* Divide a field in to sub fields
* Change the format of a field
* Group non-contiguous data in a contiguous format
* Define an area of storage in more than one format
* Define Multiple occurrences of data structures.

List and explain the different type of data structures?
Ans:

* Data area data structure
When the data area is defined in an RPG/400 program as a data area data structure, its data is implicitly retrieved for processing and written back at the end of the program. In the data area data structure, letter "U" must be entered to define the data structure as a data area data structure.

* File information data structure
A file information data structure provides exception/error information that may be occurred when processing a file during program execution. This type of data structure contains pre defined sub fields that identify
* The name of the file for which the error occurred
* The record processed when the error occurred
* The operation being processed when the error occurred
* The status code number
* The RPG/400 routine in which the error occurred.
Exception errors may be controlled by testing for an error code in the *STATUS field which is included in a file information data structure. Specifically, keywords including *FILE, *RECORD, *OPCODE, *STATUS, *ROUTINE provide the previously named information.

* Program status data structure
Program status data structure however identity exception/errors that are generated in the program by RPG/400 operations and not by a file. Note that any code greater than 00099 is flagged as an exception/error. Four keywords - *STATUS, *ROUTINE, *PROGRAM, *PARMS are supported by a program status data structure.

What is the purpose of DYNSLT keyword?
Ans:
This is a file level keyword used in a logical file. If you specify this in a file level, the system doesn't perform record selection until the program reads file. Then on the Select/Omit criteria, it selects the records from the specified file.

When would you prefer logical file than OPNQRYF?
Ans:
The physical file you are working with very large, creating and using a logical file will allow an application to perform faster than using an open query file. Since access paths created by open query files are temporary, applications that use an access path frequently will be more efficient using a logical file, since the access path will not have to be rebuilt every time the file is open.
What is the difference between SFLCLR and SFLINZ?
Ans:SFLCLR : It clears the subfile. SFLINZ : First it clears the subfile and initiliazing the numeric variables with zeros and alphanumeric variables with characters.

Define the purpose/use for SFLRNA?
Ans:Using this,
we can make specified subfile record format inactive.

What is the purpose of the following
I UDS
I 1 60ORDER#
I 7 90LINE#
Ans:
The purpose is to define the variables in I-Spec and these are further used in C-spec. Where as ‘U’ indicates data area data structure? The above code is used to update the data area value through the program. The letter "U" indicates that the defined data structure is a data area data structure.

What is the purpose of the following?
A CSRLOC (F1ROW F1COL)
Ans:
Using this record level keyword, you can specify cursor location on an output operation to the record format you are defining. The program sends output after setting the cursor location.

Define what the operation will do, the purpose of the result field and the purpose of *IN66?
HI LO EQ
C CALL 'CVTDAT' DTPRM 66
Ans:
The above statement causes, call the program and pass the parameter.

Define each of the following operation codes
a. READ To read the records sequentially.
b. READE To read the equal key records
c. READP To read the previous records
d. READC To read the records from the workstation file (Subfile).
e. REDEP To read the equal key previous records.


Define the purpose of the following code (If you know, how would this be written in RPG ILE)
HI LO EQ
C *IN66 DOUEQ *OFF
C KEY1 CHAIN FILEA 90 66
C 66 CALL PGM1 PRM
C ENDDO
Ans:
Whenever the indicator *IN66 becomes *OFF, the control transfers after ENDDO statement. Otherwise, it reads the records from the data base file based on indicator specified on HI position. If the specified indicator on LO position becomes *OFF, then only CALL statement will execute.

How do you set the keywords SFLSIZ and SFLPAG if you want the subfile to dynamically expand?
Ans
:SFLSIZ > SFLPAG.

When would you use or not use this approach?
Ans:
It is the most desirable method in building a real time applications. We can use at all the times.

How can you detect and handle a record lock situation?
Ans:
If you try to read the locked record, we can get system defined message i. e. , the program will ended abnormally. With the help of File Information Data Structure we can handle record lock situation. Generally it will happen, when the same file of type " U" used in different programs.

How can you detect overflow for a print program that prints multiple lines per cycle?
Ans:
You specify the indicators OA through OG and OV in 33 - 34 columns in a printer file. This indicator automatically set on whenever overflow occurs on a type of page.

Define a shared access path?
Ans:
To share the open data path by various programs in a same job.

What is the difference between array and a multiple occurrence data structure?
Ans:
The values stored in array don’t vary. In the other hand, we can store the
Different values in same variables at various stages.

What is *INZSR used for?
Ans:
It is special type of RPG/400 subroutine, which is executed automatically
at beginning of the program. It is a good place to code initializes the variables.

How can you execute a command from within an RPG program without calling a CLP program?
Ans:
By calling QCMDEXC application program interface we can execute a CL command with in an RPG program.

What is the purpose of the "N" in the following calculation specification?
Ans:
C KEY CHAIN FILE N 99.If you specify 'N' in 53rd position, the record will not be locked if you try to read the locked record. It is a way of avoiding the record lock.
Define what a data area is along with a brief example of what it may be used for?
Ans:
Data area is a storage area to store limited information.
Example: a new and unique customer number is generated whenever a new customer is added to customer master file. Data area keeps track of last record added and add 1 to it. Through program we can access new customer number.

Define what a data queue is along with a brief example of what it may be used for?
Ans:
Data queues provides communication between programs by calling API's QSNDDTAQ and QRCVDTAQ along with parameters like data queue name, library in which data queue exists, variable to store the number of characters to be sent, variable to store the information to be sent. We can send the same data queue to the many programs.

What is the purpose of the following?
I 'CLOSED' C STAT01
I 'OPEN' C STAT02
Ans:
It is a type of initializing the variables in I-spec. and these are further used in C-spec.

What is the difference between UDATE and the system date?
Ans:
UDATE supports two-digit year. The format is *MDY (MMDDYY).
*DATE (system date) supports four digit year. The format is *MDYY (MMDDYYYY).

List some of the commonly used commands for debugging
Ans:
STRDBG(for batch jobs), STRISDB.

Define the RCVF command?
Ans:
RCVF command used to receive the records either from the data base file or device file.

Define the purpose of the %SST function?
Ans:
To extract the information from the specified string.

Define the purpose of the *CAT function?
Ans:
To concatenate the two strings into a one string.

Define the purpose of the *BCAT function?
Ans:
To concatenate the two strings by placing a single blank in a resultant.

Describe the difference between the DOWxx and DOUxx operations?
Ans:
DOWxx : If the condition becomes true, then only the group of instructions allowed executing.
DOUxx : Irrespective of condition, it will execute at least one time.

Define the purpose of the LEAVE operation?
Ans:
If you specify LEAVE, the control transfers to the statement below the ENDDO.

Define the purpose of the ITER operation?
Ans:
If you specify the ITER, the groups of statements are allowed to execute repeatedly.

List the steps/commands necessary to accomplish the following:
a. Copy data from the file ORDHDR into file ORDHIST
b. The file ORDHIST may or may not exist
c. If the file ORDHDR does exist, it may or may not contain data
d. The file ORDHIST may or may not contain data, if the file does contain data the old data should be erased
Ans:
Commands are as follows
a. CPYF FILE(ORDHDR) TOFILE(ORDHIST)
b. CPYF FILE (ORDHDR) TOFILE (ORDHIST) CRTFILE (*YES)
c. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *ADD
d. CPYF FILE (ORDHDR) TOFILE (ORDHIST) *REPLACE

What is the purpose of the following?
FORDHDR1 IF E K DISK
ORDHDRF KRENAMEORDHDRF1
Ans:
In order to rename the record format of a data base file in a program,
we can use the above steps. Purpose of renaming is: If the record format name is similar in two files and if both are used in a same program, the program will not compile. Hence we have to rename either of the file.

What is the purpose of the following
Ans:
C/COPY QRPGSRC,ORDERR
During the compilation the source code of ORDERR copy book is copied into the existing program. Where as /COPY is compiler directive statement.

What is the purpose of the following
Ans:
FORDHDR1 CF E WORKSTN
$2SFN SFILE FMT2
The above line indicates that, $2SFN is a relative record number and FMT2 is name of the subfile record format.

How can you check for a records existence without causing and I/O (CHAIN/READ)?
Ans:With the help of File Information Data Structure, we can check existence of records in a physical file. The code is described below: In File description continuation line (IPFK), KINFDS RCDS IRCDS DS I *RECORD #RCDS with the above code we can check the existence of records in a file without causing I/O operation.
What is Alternate Table?
Ans:
RPG tables stores information in 1 column. To store information in multiple columns, it uses the concept of Alternate Table.

What is an Array?
Ans:
Array is a collection of data, the data elements must be of same Length and same type.

The Qualified name for an object ORDPF residing in a library TRAINING is?
Ans:
TRAINING/ORDPF

The function key to start SEU session through program development manager is?
Ans:
F6

The Member type for an RPG & CL program which SEU supports is?
Ans:
RPG & CLP

Printed output items placed in an output queue are known as?
Ans:
Spool Files.

When a spooled file is created, it is placed into an?
Ans:
OUTQUEUE

The command to display a list of spooled files?
Ans:
WRKSPLF

Change in the externally described file does not require recompilation of the program?
Ans:
False

Command to display current library is?
Ans:
DSPCURLIB

A PF can have how many record formats?
Ans:
Only one

Which one of the following has the highest priority Library on top of the library list, Library QGPL, Library on the bottom of the library list & Current library?
Ans:
Current library

While designing the screen user wants to add file level keywords then which function key is pressed?
Ans:
F14

While designing the report using RLU user wants to add record level keywords which function key is pressed?
Ans:
F18

If user wants to add one field on the report then which function key is pressed?
Ans:
F11

If user wants to center the company name on his report then which command will be used?
Ans:
CF (Center Field)

SEU shows prompt/syntax checking according to?
Ans:
Member Type

It is possible to run Query using RUNQRY command?
Ans:
YES

Using Query it is possible to create level break report?
Ans:
YES

Using DFU user can do which operation?
Ans:
Add, Update & Select fields

What is the difference between UPDDTA to PF & updating using DFU?
Ans:
Both are same, only difference is DFU program allows you to add & update selected
fields.

Which function key should be pressed to define hidden field while you are working with SDA?
Ans:
F4

Which function key should be pressed to watch all string defined on SDA screen?
Ans:
F20

While designing the screen using SDA, which function key should be pressed to get the field from the FRF?
Ans:
F10.

From WRKMBRPDM screen you have to modify existing member-using SDA which option do you select?
Ans
:17.

Write system defined function used to place system name on the screen?
Ans
:*SYSNAME

While designing screen F3 function key is kept common for all record formats on which level should it be defined?
Ans
:File level

Write down mandatory keywords used when defining a subfile?
Ans
:SFL, SFLDSP, SFLSIZ, SFLCTL & SFLPAG

If user wants to change the length of the numeric field defined in the report then which combination of the keys will be used?
Ans
:F23 & F10

What is the difference between SKIPB (2) & SPACEB (2)?
Ans
:SKIPB (2) skips 1 page & on the next page after skipping 2 lines space print next while SPACEB
(2) skips 2 lines space before printing.

RLU: If user wants to define new numeric field on record format then which line command will be used?
Ans:
VF

Maximum report length is 132, if user is designing a report using RLU?
Ans:
FALSE (Maximum is 378)

What is full form for DDS?
Ans
:Data Description Specification

What are members?
Ans
: Members are separate entities within a database file & they are components of As/400 object.

What if RPG, when & who invented it?
Ans
:Report Program Generator is IBM introduced a High Level Language in 1960.

For, which purpose is H Specs used?
Ans
:Writing header information, date separator, currency symbol etc.

What is the size of the filename in RPG?
Ans
:8 Characters (Max.)

Which are the different File Types in RPG?
Ans
:I (Input), O (Output), U (Update) & C (Combine).

What are the different File Designation Types in RPG?
Ans:
P (Primary) & F (Fully Procedural)

What’s the use of File Designation in RPG?
Ans
:It refers to the way program will access or retrieve the data from the file.

What are the different File Format Types in RPG?
Ans
:F (Fixed Length) & E (Externally Described)

What is the use of File Format in RPG?
Ans
:It tells to the program that the records are within the program (F) or outside the program (E).

What is L Specs for?
Ans
:To tell length of page & number of lines to be printed on a page.

What is I Specs for?
Ans:
To describe the records within Program described file, fields, constants, divide fields into sub fields & to form a group of
fields.

How many maximum spaces could be given in O Specs?
Ans
:3

Which are Control Break Logic indicators?
Ans
:L1 – L9.

What are Data Structures?
Ans:
Data Structures define an a storage & layout of fields within the defined structure.

How many triggers can be associated with a single PF?
Ans:
6 (max)

Can the objects stored in the product library be modified?
Ans:
No.

How many types of objects are there on As/400?
Ans:
80

How is data stored in PF’s?
Ans:
In fixed length records.

Give an example of DEFN opcode?
Ans
:*LIKE DEFN ENAME $ENAME (Now the $ENAME has all the attributes same like ENAME)

What is DBMS?
Ans
:A DBMS is a software system that controls the creation, organization & modification of a database & access to the date stored within it.

How can we know the triggers associated with the PF?
Ans:
DSPFD with parameter TYPE (*TRG)

How can we add & remove trigger to a PF?
Ans:
ADDPFTRG & RMVPFTRG

What is an Output Queue?
Ans:
They are the holding areas that store printed output generated from Batch programs or Interactive applications.

What does print writer do?
Ans:
It is a system job that selects files from the output queue & prints Them on a printer. It provides the interface between
output queue’s Spooled files & the printer.

What are the 2 types of lines on O Specs?
Ans
:Record Identification Line & Field Identification Line.

How can we add & remove trigger to a PF?
Ans:
ADDPFTRG & RMVPFTRG

What is an Output Queue?
Ans:
They are the holding areas that store printed output generated from Batch programs or Interactive applications.

What does print writer do?
Ans
:It is a system job that selects files from the output queue & prints Them on a printer. It provides the interface between
output queue’s Spooled files & the printer.

Can a Subroutine contain another Subroutine?
Ans:
No.

Does the SETLL & SETGT retrieve the record?
Ans:
No, they simply position to the record.

What is a table?
Ans:
A table is collection of data elements in one column, data elements Must be of same type and same length.

What is a Compile Time Table?
Ans
:We can hard code data within the program is said to be Compile Time Table.

What is a Run Time Table?
Ans:
Data from a separate disk file is loaded into a table each time the Program runs.

Give the Table definition?
Ans:
TABMT 1 12 2 A Where 1 = Number of entries per record 12 = Total number of entries 2 = Length of each entry A = Ascending
Sequene

If the data is likely to change over a period of time & Moreover data is large than which type of table is preferred?
Ans:
Compile Time Table.

What does the members in a Source Physical File contain?
Ans:
Source statements for a program.

The members in LF contain?
Ans:
Access Path.

The members in a PF contain data? (True/False)
Ans:
True

What is the command to view the library list?
Ans:
DSPLIBL

What is the command to create PF?
Ans:
CRTPF

The LF is associated with how many PF’s?
Ans:
At least one PF at a time.
Difference between CALL & SBMJOB?
Ans:
CALL performs interactively job while SBMJOB performs batch job.

Maximum number of Records in Display File?
Ans:
1024

What does VLDCMDKEY means?
Ans:
Valid Command Key.

What is Subroutine in RPG?
Ans:
A subroutine is a group of statements in a program that can be processed several times in that program.

Do we have to Execute the *INZSR compulsory?
Ans
:No, it is a system-defined subroutine it is executed automatically.

What is the use of *PSSR in the program?
Ans:
Whenever there is any type error in the program the control straight away passes onto this subroutine.

Types of Tables in RPG?
Ans:
There are 2 types of tables in RPG they are: - Compile Time Tables Pre-Runtime Tables

What is the error if we don’t get login screen?
Ans:
There is some problem with subsystem.

How to run other job when one job is active?
Ans:
Change the priority or rename the job.

Use of Data Structures?
Ans:
· Dividing a field into sub fields.
· Changing the format of a field.
· Grouping non-contiguous data in a contiguous format.
· Defining an area of storage in more than 1 format.

Types of Data Structures?
Ans:

a. File Information Data Structure.
b. Program Status Data Structure.
c. User Defined Data Structure.
d. Multiple Occurrence Data Structure.
e. Date Area Data Structure.

What is Subfile?
Ans
:A Subfile is a temporary area in memory which records may written to & read from a display file device.

Which is the subsystem that is always on till the main power switch is off?
Ans:
QCTL

What is the command to shutdown the As/400 Server?
Ans:
PWRDWNSYS & Parameter *IMMED.

How can we know the CPU utilization of the server?
Ans:
WRKACTJOB (Work with active job) WRKSYSSTS (Work with system status)

Which are the libraries (system) always present in the library list?
Ans:
QTEMP & QGPL

Which users are allowed to manipulate system libraries?
Ans:
QSECOFR & QSYSOPR

What is a Join Logical File?
Ans:
A Join Logical File combines information from two or more physical files into one record format. Join Logical Files have
always one record format.

Types of Object Locks & what they do?
Ans
:There are mainly 3 types of locks they are as follow: - *EXCL : Only the routing step holding the lock can use the
object *EXCLRD : Routing step can read/update the file other jobs can only read. *SHRUPD : All jobs can read/update the object.

How do you place or remove locks on the objects?
Ans:
*AACOBJ & *DLCOBJ

Some of the object types on which locks can be allocated?
Ans:
Data Area, Data Queue, File, Library, Message Queue, Menu &Program.

What is the opcode to release all the locks on a particular PF?
Ans:
UNLCK

What is a trigger?
Ans:
A trigger is an action that automatically occurs whenever a change Is made to a physical file.
What are the types of data areas?
Ans:
User defined Data Area, Local Data Area (LDA), Group Data Area (GDA), Program Initialization Parameter (PIP) Data Area.

What is LDA?
Ans
:LDA is created by the system for each job in the system, including auto-start jobs, jobs started on the system by a reader, and subsystem monitor jobs.

What is the type, length of a LDA?
Ans:
*CHAR, 1024 bytes

What is GDA?
Ans:
The system creates a GDA when an interactive job becomes group jobs. Only one GDA can exists for group.

How can a data area be locked after being updated?
Ans:
Using OUT *LOCK

What is the use of Data Queues?
Ans:
Data queue is a type of system object that you can create. Data Queues are used in Program to program communication.

How to create a data queues?
Ans
:Using CRTDTAQ command.

What are the valid data types in Data Queue?
Ans
:Char, Numeric, and Logical

What are the two types of read performed on data queues?
Ans:
Read with lock, and read without lock.

How do you use DEBUG utility?
Ans
:STRDBG program-name UPDPROD(*YES)

What is an authorization list?
Ans:
A lists of two or more user Ids & their authorities for system resources. The system identifies it an object type *AUTL

How do you grant authority?
Ans:
Using GRTOBJAUT command

What are the types of object authorities?
Ans
:*USE, *CHANGE, *ADD, *DLT, *READ, *UPD, *ALL, *EXCLUDE, *OBJEXIST, *OBJMGT, *OBJOPR

How do you put jobs in batch mode?
Ans
:SBMJOB

What is the use of OVRDBF ?
Ans
:You can use the Override with Database file (OVRDBF) command to replace the database file named in a CL program or to change certain parameters of the existing database file.

What is the use of OVRPRTF ?
Ans
:Override with Printer file (OVRPRTF) command is used to override certain parameters of the printer files used in the program or to replace the printer file.

How to change file attributes such as size, file wait time, record wait time etc. , permanently?
Ans
:Using CHGPF command

What is the use purpose of CRTCMD?
Ans:
To create user defined command.

What is class of service ?
Ans
:A set of link and node characteristics associated with a session.

How to see active jobs of the system.
Ans:
Using WRKACTJOB command

How do you detect unused spool storage?
Ans:
Using Reclaim Spool Storage.

What are the functions of Remote Job Entry (RJE) ?
Ans:
Allows user of AS/400 system to submit jobs and receive jobs from a host system.

What is the function of RJE Conversion Utility?
Ans
:It converts compressed data written to an AS/400 database file to decompressed data written to another AS/400 database, diskette, or device file.

What process the command SBMRJEJOB does?
Ans:
Sends RJE input stream to host system

What is journaling & Commitment Control?
Ans
:Journaling is a function which records the changes in a file in a journal. These record images are used to recover the changes in the file should the system ends abnormally. Commitment control is a function that allows you to define and process a number of changes to database files as a single unit (transaction).

What is the purpose of STRCMTCTL command?
Ans:
Starts commitment control for files that are being journalled.

What are the system objects required for journalling?
Ans
:Journal receiver, journal and PFs to be journalled.

What are the different definition levels in Data Description Specifications?
Ans:
File level, Record level, Field level, Join level, Keyfield level, Select/Omit level.

What the difference between Source Physical File and Physical File?
Ans:
A Source Physical File contains the source for the various objects created this file has specific structure. A Physical File contains data, and the record format can be different for different physical files.

What is an access path?
Ans
:The order in which the database fields are organized for processing in the program.

What are all the different types of access path?
Ans:
Arrival sequence access path. Keyed sequence access path.

What is the default value for the number of increment for the physical file?
Ans:
Three

When does the DFT keyword in PF be used?
Ans:
To specify the default value it a field.

How to create a user defined (general) data area?
Ans:
Using CRTDTAARA command

What are the different ways to input data into data area?
Ans:
CHGDTAARA (using CL)
Using OUT opcode in RPG

How to retrieve data from data area?
Ans:

Using RTVDTAARA command in CL.
Using IN opcode in RPG
What is Spool file, Why is it required?
Ans:
A file that holds output data to be processed, such as information waiting to be printed.

What is Job, What are the attributes of a Job?
Ans:
A Job is a basic unit of work on AS/400.
The attributes are:
Job Number Unique system generated sequential number
Job Name Any user defined name (Max 10 char)
User Name Who initiated the job.

What is Job description?
Ans:
A Job description defines an environment in which a batch job or an interactive job to be executed.

What is the difference between Interactive & Batch Job?
Ans:

Interactive Job: A Job started for a person who signon to a workstation.
Batch Job : A predefined group of processing actions submitted to the system to be performed.
What is Group Job?
Ans:
A Group Job is attached to one workstation and a user. There should be an initial group job and it can be branched to many other group jobs. The group jobs can have different library lists and different output, message queues. Group Job is useful in enhancing the programmers productivity. It is as though logging into the same user-id many times.

What are the two main attributes, which govern the execution of a job?
Ans:
Run time priority and Time slice

What is Sub-System?
Ans:
Sub-Systems are specific user defined partitions of the CPU where various jobs may be executed. One subsystem can have more than one active job at a time.

What is a Device file?
Ans:
A device file contains the description of how data is to be presented to a program from a device or vice versa. Device file can be Printer, Disk, Tape and Remote system.

What is the maximum number of key fields allowed defining in a physical file?
Ans:
120

What is acronym of RPG?
Ans
:Report Program Generator

What is the native language of AS/400?
Ans:
RPG/400

Why RPG/400 is famous?
Ans:
* Easy to code and analyze.
* Supports externally described files.

What is an ICF file?
Ans:
A device file that allows a program on the system to communicate with program in other system.

What is a message file?
Ans
:It is a file which contains the messages of an application. For example all RPG/400 messages are stored in a file, all COBOL/400 messages are stored in a file.

What is a job log?
Ans:
A record of request submitted to system be a job. The message related to the requests, and action performed by the system on the log. The system program maintains it.

What is the purpose of OPNQRYF (Open Query File)?
Ans:
OPNQRYF is used to select certain records of the database file based on the QRYSLT (Query select ) condition.

How to create files dynamically without DDS?
Ans:
Through OPNQRYF

What command must be executed before executing OPNQRYF command?
Ans
:OVRDBF (Override Data base file)

What is Data Area?
Ans:
Data area is an object used to hold data for access by any job running on the system. A data area can be locked to a single user, thus preventing other users from processing at the same time

1 comment: