Explore topic-wise InterviewSolutions in Current Affairs.

This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.

1.

Describe About Query/400?

Answer»

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:

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:

2.

Define A Batch Job?

Answer»
  • 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.

3.

What Are The Valid User Defined Data Area Types?

Answer»

CHAR, NUMERIC and LOGICAL

CHAR, NUMERIC and LOGICAL

4.

What Is Multi­format Logical File?

Answer»

Logical which uses FIELDS from TWO or more physical FILES.

Logical which uses fields from two or more physical files.

5.

What Is The Select And Omit Criteria In Logical File?

Answer»

This is USED to specify rules for the Selection/Omission of RECORDS from a Physical File.

This is used to specify rules for the Selection/Omission of records from a Physical File.

6.

Can Fields Be Concatenated Ina Logical File Level?

Answer»

YES. by USING CONCAT KEYWORD

Yes. by using CONCAT keyword

7.

When Would The All Keyword Be Used?

Answer»

USE with SELECT or OMIT, to select/omit RECORDS.

Use with Select or Omit, to select/omit records.

8.

What Are The Different Types Of Keywords In Display Files?

Answer»

FILE LEVEL, RECORD FORMAT level, FIELD level

File level, Record format level, Field level

9.

What Is Difference Between Cat, Tcat, Bcat?

Answer»

CAT – Concatenate two variables or CONSTANTS into one CONTINUOUS string.
BCAT – Truncates all trailing blanks in the first character string, one blank is inserted, then the two character STRINGS are concatenated.
TCAT – Truncates all trailing blanks in the first character string, the two character strings are concatenated.

CAT – Concatenate two variables or constants into one continuous string.
BCAT – Truncates all trailing blanks in the first character string, one blank is inserted, then the two character strings are concatenated.
TCAT – Truncates all trailing blanks in the first character string, the two character strings are concatenated.

10.

What Are The Different Types Of Messages In Cl?

Answer»

IMMEDIATE MESSAGE, BREAK message, PROGRAM message, USER message

Immediate message, Break message, Program message, User message

11.

How To Trap Errors In Cl?

Answer»

By USING MONITOR MESSAGE COMMAND (MONMSG)

By using Monitor Message Command (MONMSG)

12.

What Is The Maximum Length Of A Variable Name In Cl?

Answer»

MAXIMUM 11 CHARACTERS (INCLUDING ‘&’)

Maximum 11 characters (including ‘&’)

13.

What Is The Use Of Header Specification In Rpg/400?

Answer»

It identifies by H in column 6, PROVIDES INFORMAION about generating and RUNNING programs.

It identifies by H in column 6, provides informaion about generating and running programs.

14.

When Will Dump And Debug Opcodes Be Ignored?

Answer»

If BLANK is specified in position 15 of H specs.

If blank is specified in position 15 of H specs.

15.

Specify Different Indicators Used In Rpg?

Answer»

16.

What Is The Use Of E Specification In Rpg?

Answer»

Extension SPECS describes all RECORD ADDRESS FILES, arrays and tables.

Extension Specs describes all record address files, arrays and tables.

17.

What Are Control Level Indicators?

Answer»

L1 to L9 USED to identify CERTAIN fields on CONTROL fields and then used to CONDITION which OPERATIONS are to be processed at detail or total calculation or output time.

L1 to L9 used to identify certain fields on control fields and then used to condition which operations are to be processed at detail or total calculation or output time.

18.

What Is The Use Of L Specs In Rpg?

Answer»

Line counter SPECIFICATION can be used to describe printer file to indicate the length of the FORM and NUMBER of LINES per PAGE.

Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page.

19.

What Is Library Is As400? What Are The Types Of Library?

Answer»

When we execute a command or call a program, the AS/400 MUST know where to find the command or program and the answer is library. A Library is a collection of objects. QSYS is the only library that contains other library. QSYS is the root library where the entire user defined/ SYSTEM defined library is created. System supplied libraries begin with the letter "Q" or "#".
Library list types:
System library: All IBM supplied library e.g. QSYS, QHLPSYS, QUSRSYS…
Product Library: Whenever Ibm product is USED it is added to the library automatically and is removed itself when the job completes.
Current Library: Current library is the working library i.e. all the work done by you is stored in current library.
User Library: Non-IBM supplied i.e. created by the user.

When we execute a command or call a program, the AS/400 must know where to find the command or program and the answer is library. A Library is a collection of objects. QSYS is the only library that contains other library. QSYS is the root library where the entire user defined/ system defined library is created. System supplied libraries begin with the letter "Q" or "#".
Library list types:
System library: All IBM supplied library e.g. QSYS, QHLPSYS, QUSRSYS…
Product Library: Whenever Ibm product is used it is added to the library automatically and is removed itself when the job completes.
Current Library: Current library is the working library i.e. all the work done by you is stored in current library.
User Library: Non-IBM supplied i.e. created by the user.

20.

Is Qgpl A User Library Or System Library?

Answer»

It’s a USER LIBRARY.

It’s a user library.

21.

What Is Source Physical File?

Answer»

SOURCE physical file is a file which contains the sources of DIFFERENT types of objects. There can be up to 32768 members. Source physical file is an object. But the source member is not an object. When we compile the member, the object is CREATED for that source. Command used is CRTSRCPF.
CRTSRCPF FILE(IROBO1/QRPGSRC) RCDLEN(112) TEXT('SOURCE PHYSICAL FILE’)

Source physical file is a file which contains the sources of different types of objects. There can be up to 32768 members. Source physical file is an object. But the source member is not an object. When we compile the member, the object is created for that source. Command used is CRTSRCPF.
CRTSRCPF FILE(IROBO1/QRPGSRC) RCDLEN(112) TEXT('SOURCE PHYSICAL FILE’)

22.

How To See All Members Of A File?

Answer»

By USING the COMMAND SHOWN below:
DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*MBRLIST)

By using the command shown below:
DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*MBRLIST)

23.

How To See All Record Formats Used In A File?

Answer»

By USING the COMMAND SHOWN below:
DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*RCDFMT)

By using the command shown below:
DSPFD FILE(IROBO1/QRPGLESRC) TYPE(*RCDFMT)

24.

How Can We Arrange Duplicate Records In A File?

Answer»

For this we will USE file level keywords FIFO/LIFO/FCFO in the physical file.
FIFO: The duplicate KEY RECORDS will retrieved in FIRST in first out order.
LIFO: The duplicate key records will retrieved in last in first out order.
FCFO: The duplicate key records will retrieved in first changed first out order.

For this we will use file level keywords FIFO/LIFO/FCFO in the physical file.
FIFO: The duplicate key records will retrieved in first in first out order.
LIFO: The duplicate key records will retrieved in last in first out order.
FCFO: The duplicate key records will retrieved in first changed first out order.

25.

Can Level Check Error Occur If We Do Chgpf?

Answer»

It depends on the value that we have SET for LVLCHK (RECORD format LEVEL check) attribute. If its value is *YES then the record format level identifier is checked when the file is OPENED and if it doesn’t MATCH it throws the error. If its value is *NO, then the record format level identifier is not checked, hence no error.

It depends on the value that we have set for LVLCHK (Record format level check) attribute. If its value is *YES then the record format level identifier is checked when the file is opened and if it doesn’t match it throws the error. If its value is *NO, then the record format level identifier is not checked, hence no error.

26.

What Is The Use Of Jdftval In As400?

Answer»
  • When this FILE-level KEYWORD is used the system provides DEFAULT VALUES for all for fields when a join to a secondary file does not produce any records.
  • If this keyword is not specified a record in the primary file for which there is no corresponding record in the secondary file is SKIPPED.

27.

What Is The Difference Between Access Path And Dynamic Select?

Answer»

Dynamic SELECT OCCURS whenever the program reads FILE. But ACCESS PATH occurs before the file is read (but not necessarily).

Dynamic select occurs whenever the program reads file. But access path occurs before the file is read (but not necessarily).

28.

What Is Dynslt?

Answer»

DYNSLT: Use this file-level keyword to indicate that the SELECTION and omission TESTS specified in the file (using select/omit specifications) are done at PROCESSING time. This keyword specifies dynamic select/omit rather than access path select/omit.
Only a Physical file contains data. Logical files just contain pointers for processing the data in a specific sequence and/or subset of data.
When a record is added/changed/deleted in a physical file, the system has to put a lock on it and then go out to CHECK and update any logical files before it can release the lock. While the amount of time to do this is hardly measurable, it can be significant if massive batch UPDATES are done to a file. 
If you are using the Select/Omit option in your DDS and using DYNSLT, the above process does not need to be done at record update time. 
Where this is beneficial is when your selection process includes almost all the records in the file. Now when you process using DYNSLT, it will read all the records in the file, but do the selection of which records to process at that time rather than having done all the maintenance ahead of time.

DYNSLT: Use this file-level keyword to indicate that the selection and omission tests specified in the file (using select/omit specifications) are done at processing time. This keyword specifies dynamic select/omit rather than access path select/omit.
Only a Physical file contains data. Logical files just contain pointers for processing the data in a specific sequence and/or subset of data.
When a record is added/changed/deleted in a physical file, the system has to put a lock on it and then go out to check and update any logical files before it can release the lock. While the amount of time to do this is hardly measurable, it can be significant if massive batch updates are done to a file. 
If you are using the Select/Omit option in your DDS and using DYNSLT, the above process does not need to be done at record update time. 
Where this is beneficial is when your selection process includes almost all the records in the file. Now when you process using DYNSLT, it will read all the records in the file, but do the selection of which records to process at that time rather than having done all the maintenance ahead of time.

29.

What Is Logical File In As400? What Are The Types Of Logical File?

Answer»

Logical file : 

  • Logical file does not occupy any memory.
  • ONE or more logical file can be derived from a SINGLE physical file.
  • It simply contains the record selection definition and when accessed retrieves the RECORDS from the physical file to which it REFERS.
  • A logical file can contain up to 32 record formats.
  • It selects records dynamically. It cannot exist without a physical file.
  • We can filter the data with criteria by using SELECT and omit command.
  • A logical file does not contain any data but provides the ‘VIEWS’ of the data to satisfy end-user’s needs.

Types of Logical file :  There are two types.

  1. Non-join logical file
  2. Join logical file

Logical file : 

Types of Logical file :  There are two types.

30.

What Is The Default Access Path Of A File?

Answer»

If you do not specify the type of maintenance for a FILE, the DEFAULT is IMMEDIATE maintenance.

If you do not specify the type of maintenance for a file, the default is immediate maintenance.

31.

What Are The Record Format Field Mapping Options In Cpyf?

Answer»

RECORD format field mapping (FMT):

MAP :  Fields with the same name in the from-file and to-file record formats are copied, and any fields in the to-file that do not exist in the from-file format are set to the default value specified on the DFT keyword for the data description specification (DDS) of the to-file or zero for numeric fields, blanks for character fields, current date/time for date/time fields, or null value for null-capable fields.
If *MAP is specified, *DROP can also be specified.
DROP : This value must be specified for field-level mapping if any of the field names in the from-file record format do not exist in the to-file format. If *DROP is specified, *MAP can also be specified. When *DROP is specified, all the field names that exist in both record formats must have the same attributes and relative positions in the from-file and to-file record formats, or *MAP must also be specified. Null values are copied.
NOCHK :  If the record formats of the database files are different, the copy operation continues DESPITE the differences. Record data is copied DIRECTLY (left to right) from one file to the other. FMTOPT (*NOCHK) is required when copying all record formats from a logical file with multiple formats (when RCDFMT (*ALL) is specified) to a physical file that is of the same type (source or data) as the from-file.
CVTSRC : This value is used to copy between database files, from a source file to a data file, or from a data file to a source file. It is valid only when the from-file and to-file are different TYPES (source and data).

Record format field mapping (FMT):

MAP :  Fields with the same name in the from-file and to-file record formats are copied, and any fields in the to-file that do not exist in the from-file format are set to the default value specified on the DFT keyword for the data description specification (DDS) of the to-file or zero for numeric fields, blanks for character fields, current date/time for date/time fields, or null value for null-capable fields.
If *MAP is specified, *DROP can also be specified.
DROP : This value must be specified for field-level mapping if any of the field names in the from-file record format do not exist in the to-file format. If *DROP is specified, *MAP can also be specified. When *DROP is specified, all the field names that exist in both record formats must have the same attributes and relative positions in the from-file and to-file record formats, or *MAP must also be specified. Null values are copied.
NOCHK :  If the record formats of the database files are different, the copy operation continues despite the differences. Record data is copied directly (left to right) from one file to the other. FMTOPT (*NOCHK) is required when copying all record formats from a logical file with multiple formats (when RCDFMT (*ALL) is specified) to a physical file that is of the same type (source or data) as the from-file.
CVTSRC : This value is used to copy between database files, from a source file to a data file, or from a data file to a source file. It is valid only when the from-file and to-file are different types (source and data).

32.

What Is The Difference Between Crtdupobj And Copyf?

Answer»

In CRTDUPOBJ for a logical FILE the created duplicate file will be also logical file and for a physical file the created file will also be a physical file. Even the RECORD format identifier will also be the same. While in CASE of COPYF, if we are COPYING a logical file then the created file be a physical file not a logical file.

In CRTDUPOBJ for a logical file the created duplicate file will be also logical file and for a physical file the created file will also be a physical file. Even the record format identifier will also be the same. While in case of COPYF, if we are copying a logical file then the created file be a physical file not a logical file.

33.

What Is Access Path In As400?

Answer»

Access path

  •  Access path describes the order in which records are to be read.
  •  Access paths can be KEPT on the system permanently (such as physical or logical file) or temporarily.
  •  OPNQRYF COMMAND MAY create a TEMPORARY access path for USE one time, and then discard the access path.

Access path

34.

What Is The Difference Between Non-join Logical Files And Join Logical Files?

Answer»

Non join logical FILE:

  • We can insert or DELETE or update records using non-logical file.
  • DFU can be used to display non-join logical file.
  • 1-32 record format is specified
  • Commitment control is used

Join logical file:

  • Insertion, UPDATING or deletion of records is not POSSIBLE in join logical files.
  • DFU is not AVAILABLE
  • Only one record format can be specified
  • Commitment control cannot be used.

Non join logical file:

Join logical file:

35.

What Is The Difference Between Physical File And Logical File?

Answer»

Physical file

  • Occupies the portion of memory. It’s containing data. 
  • A physical file contains one record format
  • Can be exist EVEN WITHOUT LF
  • If you delete a LF, the PF can’t be DELETED
  • CRTPF command is used to CREATE such object

Logical file

  • Does not OCCUPY any memory space. Does not contain any data.
  • A logical file can contain up to 32 record formats.
  • Can’t exist without PF
  • If you delete a LF, the PF can’t be deleted
  • CRTLF command is used to create such type object

Physical file

Logical file

36.

What Is Array In As400? What Are The Types Of Array?

Answer»

Array is collection of elements of same DATA type.
Types of Array

  1. COMPILE TIME array
  2. Pre-runtime array
  3. RUN time array

Array is collection of elements of same data type.
Types of Array

37.

What Is Data Structure In As400? What Is The Use Of Data Structure?

Answer»

DATA STRUCTURE :

  •  Data structure in general means a structure of different data type.
  •  Data structure is specified in the Input Specification of an RPG 3 Program whereas in RPG 1V we specify it in 'D' specification.

Data Structure is used:-

  1. To break fields into SUBFIELDS
  2. To Group fields
  3. To change the format of the field
  4. To Group non-CONTIGUOUS data into contiguous format
  5. To CONVERT data.

DATA STRUCTURE :

Data Structure is used:-

38.

What Are The Types Of Data Structure In As400?

Answer»

Below are the types of DATA structures in as/400:

  •  PROGRAM DESCRIBED DATA STRUCTURE
  •  EXTERNALLY DESCRIBED DATASTRUCTURE
  •  MULTIPLE OCCURENCE DATASTRUCTURE
  •  INDICATOR DATA STRUCTURE
  •  DATA AREA DATA STRUCTURE (SPECIFIED IN 'U')
  •  PROGRAMME STATUS DATASTRUCTURE (SPECIFIED IN 'S')
  •  FILE INFORMATION DATASTRUCTURE

Below are the types of data structures in as/400:

39.

What Is Program Status Data Structure(psds) In As400?

Answer»

A program status data structure (PSDS) can be defined to make program exception/error INFORMATION available to the program so that the necessary action can be taken for the UNHANDLED exception. The exception /errors can beDivide by ZERO, array index out-of-bound, INVALID Date, Time or Timestamp value. The PSDS must be defined in the main source section; THEREFORE, there is only one PSDS per module.

A program status data structure (PSDS) can be defined to make program exception/error information available to the program so that the necessary action can be taken for the unhandled exception. The exception /errors can beDivide by zero, array index out-of-bound, Invalid Date, Time or Timestamp value. The PSDS must be defined in the main source section; therefore, there is only one PSDS per module.

40.

What Is File Information Data Structure(infds) In As400?

Answer»

A FILE INFORMATION data structure (INFDS) can be DEFINED for each file to make file exception/error and file FEEDBACK information available to the program.

A file information data structure (INFDS) can be defined for each file to make file exception/error and file feedback information available to the program.

41.

How Can We Create Subsystem In As400?

Answer»

Steps of creating the subsystem :
CREATE Subsystem description (CRTSBSD) :
 First of all we create subsystem description as below:
CRTSBSD SBSD (AMINEM/MYSBSD) POOLS ((2 *BASE)) MAXJOBS(2) TEXT('My subsystem description')
Here, the subsystem job will run in pool 2 and will use *BASE for main memory storage. There can maximum of 2 jobs inside the subsystem at a time.
Create Job queue (CRTJOBQ) : Then we create a job queue as below:
CRTJOBQ JOBQ (AMINEM/MYJOBQ) TEXT('My job queue') 
Add Job Queue Entry (ADDJOBQE) : Once the job queue is created, then we attach the (ADDJOBQE) command, as follows:
ADDJOBQE SBSD (AMINEM/MYSBSD) JOBQ (AMINEM/MYJOBQ) MAXACT (1)
MAXACT denotes the number of the jobs that can be PROCESS at the same time.
Create Class (CRTCLS)
Class defines the run time attribute e.g. Run priority, Time slice, Default WAIT time, Maximum temporary storage etc.
CRTCLS CLS(AMINEM/MYCLS) RUNPTY(40)
Add Routing Entry (ADDRTGE)
ADDRTGE SBSD(AMINEM/MYSBSD) SEQNBR(9999) CMPVAL(*ANY) PGM(SYS/QCMD) CLS(AMINEM/MYCLS)
Start Subsystem (STRSBS)
STRSBS SBSD(AMINEM/MYSBSD)
Once the subsystem is started it can be used to submit the job.

Steps of creating the subsystem :
Create Subsystem description (CRTSBSD) :
 First of all we create subsystem description as below:
CRTSBSD SBSD (AMINEM/MYSBSD) POOLS ((2 *BASE)) MAXJOBS(2) TEXT('My subsystem description')
Here, the subsystem job will run in pool 2 and will use *BASE for main memory storage. There can maximum of 2 jobs inside the subsystem at a time.
Create Job queue (CRTJOBQ) : Then we create a job queue as below:
CRTJOBQ JOBQ (AMINEM/MYJOBQ) TEXT('My job queue') 
Add Job Queue Entry (ADDJOBQE) : Once the job queue is created, then we attach the (ADDJOBQE) command, as follows:
ADDJOBQE SBSD (AMINEM/MYSBSD) JOBQ (AMINEM/MYJOBQ) MAXACT (1)
MAXACT denotes the number of the jobs that can be process at the same time.
Create Class (CRTCLS)
Class defines the run time attribute e.g. Run priority, Time slice, Default wait time, Maximum temporary storage etc.
CRTCLS CLS(AMINEM/MYCLS) RUNPTY(40)
Add Routing Entry (ADDRTGE)
ADDRTGE SBSD(AMINEM/MYSBSD) SEQNBR(9999) CMPVAL(*ANY) PGM(SYS/QCMD) CLS(AMINEM/MYCLS)
Start Subsystem (STRSBS)
STRSBS SBSD(AMINEM/MYSBSD)
Once the subsystem is started it can be used to submit the job.

42.

What Is Compiler Directive In As400? Give Example Of Compiler Directive.?

Answer»

Compiler directive : Compiler directive is an instruction (directive) given to the compiler, to perform some SPECIFIC task during compilation or to GENERATE customize compiler listing report after compilation.
Compiler directive serve many purposes like it is used to control the heading information in compiler listing, to control the spacing of the compiler listing, to include source statement from other source member, to do a free form calculation in our rpgle program, to control the source records selection/omission based on some condition etc.
Compiler directives are:

  1. /FREE... /END-FREE
  2. /TITLE
  3. /EJECT
  4. /SPACE
  5. /COPY or /INCLUDE
  6. /IF……/ELSEIF…. /ELSE…… /ENDIF
  7. /EOF

Compiler directive : Compiler directive is an instruction (directive) given to the compiler, to perform some specific task during compilation or to generate customize compiler listing report after compilation.
Compiler directive serve many purposes like it is used to control the heading information in compiler listing, to control the spacing of the compiler listing, to include source statement from other source member, to do a free form calculation in our rpgle program, to control the source records selection/omission based on some condition etc.
Compiler directives are:

43.

Define A Job Queue?

Answer»

JOB queues are queues of batch jobs WAITING to be PROCESSED.

Job queues are queues of batch jobs waiting to be processed.

44.

What Is The Purpose Of Level Check Parameter In A Physical File?

Answer»

SPECIFIES whether the LEVEL identifiers of the RECORD FORMATS in the PHYSICAL file are checked when the file is opened by the program.

Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program.

45.

Describe The Function Of Setgt Operation In Rpg Language?

Answer»

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.

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.

46.

Describe The Function Of Setll Operation In Rpg Language?

Answer»

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.

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.

47.

How Many Libraries Can Be There In Library List?

Answer»

TOTAL 40 (15 SYSTEM and 25 application).

Total 40 (15 system and 25 application).

48.

What Is Library List?

Answer»

A LIST that INDICATES libraries used for the PROCESS and the order in which it has to be searched System IDENTIFIES it in *LIBL.

A list that indicates libraries used for the process and the order in which it has to be searched System identifies it in *LIBL.

49.

What Is A Library In As/400?

Answer»

A LIBRARY in AS/400 is an OBJECT that serve(acts) as a repository for other OBJECTS.

A library in AS/400 is an object that serve(acts) as a repository for other objects.

50.

How Are The Objects Stored On As/400?

Answer»

All objects are stored on AS/400 in a single level STORAGE. In this method all objects are referenced by one virtual ADDRESS which is translated in to a physical address whether it is an auxiliary storage or MAIN MEMORY.

All objects are stored on AS/400 in a single level storage. In this method all objects are referenced by one virtual address which is translated in to a physical address whether it is an auxiliary storage or main memory.

Previous Next