Sie sind auf Seite 1von 33

AS/400

QUESTION BANK

TABLE OF CONTENTS

AS/400

SYSTEM

1

OS/400

3

DATABASE FILES

11

DISPLAY FILES

14

 

SUBFILES :

17

CONTROL LANGUAGE (CL/400)

19

RPG/400

21

MISCELLANEOUS

33

APPENDIX - A

35

AS/400 SYSTEM

QS30001

What is the Configuration of the AS/400 system on which you have

How many terminals can be connected to a port ?

AS30001

worked? System E35(Model 9406), 24MB main memory, 3.2GB of HD and

QO20002

supports 49 terminals(7 Port).

AO20002

7 terminals

QS20003

What do the terms CUA and SAA stand for?

What are the communication protocols supported by AS/400 ?

AS20003

Common User Access

QL40004

Systems Application Architecture

AL40004

APPC (Advanced Program to Program Communication)

QS30005

BSCEL(Binary Synchronous Link) ASYNCH(Asynchronous Communication) RETAIL TCP IP FINANCE SNUF SNA Upline facility INTRA Intrasystem communication.

AS30005

What are the different ways of connecting a terminal to a system ? Twinnax, Workstation, ASCII and OS/2 Workstation.

QL30006

Why is AS/400 called an Object Oriented Machine ?

AL30006

Everything on the AS/400 system that can be stored or retrieved is

QS30007

contained in an Object. Object exist to make users independent of the implementation techniques used in the machine.

AS30007

What is SAA ? Systems Application Architecture (SAA) is a collection of selected

QS30008

software Interfaces, Conventions and Protocols that will provide a consistent framework across the System/370, AS/400 and PS/2.

AS30008

What are the different AS/400 rack models supplied by IBM ? 9402, 9404 and 9406.

QL10009

What are the different high-level languages available on AS/400 ?

AL10009

RPG/400, CL/400, BASIC, PL/1, C/400, PASCAL, FORTRAN/400 and RM/COBOL-85, COBOL/400 etc

Q1S2001

What are all the IBM Mid range machines prior to AS/400?

A1S2001

S/38, S/36, S/34, S/32 &S/3.

Q1O2002

What is the Operating System on AS/400?

A1O2002

OS/400.

Q1S2003

What are office tasks available on AS/400?

A1S2003

Office Vision/400 & PC Support/400.

Q1S2004

What are the graphic utilities available on AS/400?

A1S2004

BGU & GDDM.

OS/400

QO20010

What is the version of OS/400 that you have used?

AO20010

Ver 2.2

QS40011

What is DDM ?

AS40011

Distributed Data Management is a function of the OS/400 that allows

QS30012

an application program or user on one system to use database files stored on remote system.

AS30012

What are the facilities available on AS/400 for self-learning ? on-line education, Q&A Database and Help.

QS20013

What is an Object ?

What are the different types of Objects available in the AS/400 ?

How are the objects stored in AS/400 ?

AS20013

An object is any thing that exist in and occupies space in storage and

QS20014

on which operation can be performed.

AS20014

Libraries, Folders, Files, Programs, Combined definitions, Queues,

QL50015

User Profiles.

AL50015

All objects are stored on AS/400 in a single level storage. In this

QS30016

method all objects are referenced by one virtual address which is translated into a physical address whether it is a auxiliary storage or main memory.

AS30016

What is a library in AS/400 ? A library in AS/400 is an object that serves as a repository for other

Name few IBM supplied libraries ?

QS20017

objects.

AS20017

QGPL, QTEMP, QUSRTOOL, QSYS, QRPG & QCBL.

QS10018

What is a library list ?

How many libraries can be there in a library list ?

AS10018

A list that indicates libraries used for the process and the order in

QO30019

which it has to be searched. System identifies it in *LIBL.

AO30019

Total 40 (15 system and 25 application).

QO30020

Where is the system part of the library list stored ?

AO30020

In SYSVAL

QS40021

What is a Folder ?

What are the different Application Development Tools available on

AS40021

A Folder is a named object that is used as a directory for documents

QS20022

and other folders. Folders can be filed with in another folder.

AS20022

AS/400 ? SEU, RLU, PDM, SDA, QUERY

QO30023

What are the levels of security on AS/400 ?

AO30023

10,20,30,40,50

QS30024

What is error severity ?

What is a User Profile ? What are the various classes ?

AS30024

Error severity determines the level of severity that is required to

QL50025

terminate the job.

AL50025

User profile is an object which identifies a user to the system. It

QS40026

contains user name, Password, Owned objects, Authorized objects, Scheduling priority, Special authority, Initial program, Job description. Security officer, Programmer, Workstation, System operator, Programmer services Rep & Customer engineer.

AS40026

What is Group Profile ? It is similar to User Profile, but the attributes specified is applicable to

What are the different types of queues in AS/400 ?

QS20027

an entire group.

AS20027

Job queue, Message queue, Output queue, Data queue.

QL20028

What are JobQ and PrintQ ?

AL20028

JobQ : An object that contains a list of batch jobs waiting to be

QL20029

processed by the system. PrintQ : An object that contains a list of spool files to be written to a printer device.

AL20029

What is a Spool file ? Why is it required ? A file that holds output data to be processed, such as information

What is a Job ? What are the attributes Of a job ?

QL30030

waiting to be printed.

AL30030

A job is the basic unit of work on AS/400

The attributes are :

Job Number : Unique system generated sequential number

Job Name

User Name : Who initiated the job

: Any user defined name (Max. 10 char)

QS20031

What is job description ?

What is the difference between Interactive & Batch job ?

AS20031

A job description defines the environment in which a batch/interactive

QL20032

job is to be executed.

AL20032

Interactive Job : Job started for a person who signon to a workstation.

QL30033

Batch Job : A predefined group of processing actions submitted to the system to be performed.

AL30033

What is a Group Job ? A Group Job is attached to one workstation and a user. There should be

QO20034

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.

AO20034

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

QL20035

What is a sub-system ?

AL20035

Sub-Systems are specific user defined partitions of the CPU where

QL20036

various jobs may be executed. One subsystem can have more than one active job at a time.

AL20036

What is a device file ? A device file contains the description of how data is to be presented to a

QS30037

program from a device or Vice versa. Device file can be Printer, Disk, Tape or Remote system.

AS30037

What is an ICF file ? A device file that allows a program on the system to communicate with

What is a message file ?

QS30038

program in other system.

AS30038

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.

QL30039

What is a job log ?

AL30039

A record of request submitted to system be a job. The message related

to

the requests, and the action performed by the system on the log. It is

maintained by the system program

QL20040

What is the purpose of OPNQRYF (Open Query File) ?

How do you create files dynamically without DDS ?

AL20040

OPNQRYF is used to select certain records of the database file based

QS10041

on the QRYSLT (Query select) condition.

AS10041

Through OPNQRY.

QO10042

What command must be executed before executing OPNQRYF

AO10042

command ? OVRDBF.

QL30043

What is a data area ?

AL30043

A 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.

QS20044

What are the types of data areas ?

What is LDA ?

AS20044

User defined Data Area, Local Data Area (LDA), Group Data Area

QS20045

(GDA), Program Initialization Parameter (PIP) Data Area.

AS20045

An LDA is created by the system for each job in the system, including

QS10046

autostart jobs, jobs started on the system by a reader, and subsystem monitor jobs.

AS10046

What is the type and length of an LDA ? *CHAR, 1024 bytes.

QS20047

What is GDA ?

How can you create a user defined data area ?

AS20047

The system creates a GDA when an interactive job becomes group

QS10048

jobs. Only one GDA can exists for a group.

AS10048

Using CRTDTAARA command.

QS10049

What are the different ways to input data into a data area ?

AS10049

CHGDTAARA (using CL) Using OUT opcode in RPG

QS10050

How do you retrieve data from data area ?

AS10050

Using RTVDTAARA command in CL Using IN opcode in RPG.

QS10051

What are the valid user defined data area types ?

AS10051

CHAR, NUMARIC and LOGICAL.

QS20052

How can a data area be locked after being updated ?

AS20052

Using OUT *LOCK.

QS20053

What is the use of data queues ?

How do you create data queues ?

AS20053

Data queue is a type of system object that you can create. Data queues

QO10054

are used in program to program communication.

AO10054

Using CRTDTAQ command.

QS10055

What are the valid data types for a data queue ?

AS10055

Char, Numeric, and Logical.

QS20056

What are the two types of read performed on data queues ?

AS20056

Read with lock, and read without lock.

QS20057

How do you use DEBUG utility ?

AS20057

STRDBG program-name UPDPROD(*YES)

QS30058

What is an authorization list ?

How do you grant authority for an object?

AS30058

A list of two or more user Ids & their authorities for system resources.

QO10059

The system identifies it as an object type *AUTL.

AO10059

Using GRTOBJAUT command.

QL30060

What are the types of object authorities ?

How do you execute jobs in batch mode ?

AL30060

*USE, *CHANGE, *ALL, *EXCLUDE, *AUTL, *OBJEXIST,

QO20061

*OBJMGT, *OBJOPR, *ADD, *DLT, *READ, *UPD.

AO20061

SBMJOB

QL40062

What is the use of OVRDBF ?

AL40062

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.

QL30063

What is the use of OVRPRTF ?

AL30063

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.

QO30064

How do you change file attributes such as size, file wait time, record

AO30064

wait time etc., permanently ? Using CHGPF command.

QO10065

What is the purpose of CRTCMD ?

AO10065

To create user defined command.

QS30066

What is class of service ?

AS30066

A set of link and node characteristics associated with a session.

QO10067

How to see active jobs of the system ?

AO10067

Using WRKACTJOB command.

QS30068

How do you detect unused spool storage ?

AS30068

Using Reclaim Spool Storage.

QS50069

What are the functions of Remote Job Entry (RJE) ?

What is the function of RJE Conversion Utility ?

AS50069

Allows user of AS/400 system to submit jobs and receive jobs from a

QL50070

host system.

AL50070

It converts compressed data written to an AS/400 database file to

QS40071

decompressed data written to another AS/400 database, diskette, or device file.

AS40071

What is the function of the SBMRJEJOB command ? Sends RJE input stream to host system.

QL40072

What is journalling and commitment control ?

AL40072

Journalling is a function which records the changes in a file

QS30073

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 no. of changes to database files as a single unit(transaction).

AS30073

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

QS40074

What are the system objects required for journalling ?

AS40074

Journal receiver, journal and PFs to be journalled.

Q2S4001

What is CPF ?

A2S4001

Control Program Facility (CPF) is an operating system on S/38.

Q2S4002

What is invocation stack ?

What is time slice ?

What is IPL ?

What does V2R2M0 mean ?

A2S4002

List of programs maintained by the system as one program calls

Q2S3003

another in a series of calls within a single task or job.

A2S3003

A finite amount of time in which a job is granted system resources

Q2S4004

while other jobs are queued.

A2S4004

Initial Program Loading (IPL) is run by OS/400 when the system is

Q2S3005

started.

A2S3005

Ver. 2, Release 2 & Modification level 0. This refers to the version of

OS/400.

Q2S3006

Name the commands used to duplicate a file ?

A2S3006

CPYF - Copy File & CRTDUPOBJ - Create Duplicate Object.

Q2AS3007

Name the command for changing the attributes of a spool file ?

A2S3007

CHGSPLFA - Change Spool file Attributes.

Q2S3008

Name the command which gives the attributes of a job ?

A2S3008

RTVJOBA - Retrieve Job Attributes.

Q2S2009

What is the function of PDM ?

What is the function of SEU ?

A2S2009

Productivity tool for copying, deleting, scanning, changing & creating

Q2S2010

source files.

A2S2010

A utility for editing programming language source code.

DATABASE FILES

QL30075

What are the different definition levels in Data Description

AL30075

specifications ? File level, Record level, Field level, Join level, Keyfield level, Select/Omit level.

QL30076

What is difference between Source Physical File and Physical File ?

AL30076

A Source Physical File contains the source for the various objects

QS20077

created. This file has a specific structure. A Physical File contains data, and the record format can be different for different physical files.

AS20077

What is the difference between Physical and Logical files ? Physical file contains data, where as Logical file serves as a access

What is an access path ?

What are all the different types of access paths ?

How many record formats can you have in a Physical file and in a

What is a field reference file ?

What is the default value for the number of increments for the physical

QS20078

Path to database.

AS20078

The order in which the database fields are organized for processing in

QS30079

the program.

AS30079

Arrival sequence access path,

QS30080

Keyed sequence access path.

AS30080

Logical file ? Physical file can contain only one record format, Logical file can

QS20081

contain more than one record format.

AS20081

A field reference file is a physical file which contains no data, contains

QO20082

field description. this is used as a reference file by other physical files.

AO20082

file ? Three.

QS10083

When is the DFT keyword in PF used for?

AS10083

To specify the default value it a field.

QS20084

What is Multi-format logical file ?

AS20084

Logical which uses fields from two or more physical files.

QL30085

What is dynamic select ?

AL30085

Selection and omission of LF records performed during processing, instead of access path is maintained. This can be used when key access path does not exist.

QL20086

What is the Select and Omit criteria in logical file ?

AL20086

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

QS20087

Can fields be concatenated at the logical file level ?

AS20087

Yes, by using CONCAT keyword.

QS30088

When would the ALL keyword be used ?

AS30088

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

QS30089

What is a Join Logical File, Can it be used for Update ?

How many files can be joined at a time, What is the max. no. of files ?

AS30089

Logical file that combines more than one physical file.

QL30090

Update is not possible through JLF.

AL30090

At a time you can join two files. The max. no. of files is 32.

QO20091

Only one primary file and the remaining are secondary files, The primary file and atleast one secondary file must be physical files.

AO20091

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

QS10092

What is FCFO, FIFO, LIFO in Database environment ?

AS10092

These are file level keywords which are used to access the records in

QL40093

the order FCFO: First Changed First Out FIFO: First In First Out LIFO: Last In Fist Out

AL40093

If a file layout is changed, how do you generate new PF and retain data? Copy the file and change the structure of Physical file, later copy old

What is the overhead on logical file ? How can it be improved ?

QS50094

file with drop option.

AS50094

Maintaining access path and storage space. We can improve the

QS40095

performance by using *DELAYED, *REBUILD keywords to enhance the speed.

AS40095

How can the sign of a numeric be ignored when sequencing a logical file ? By specifying the record level keyword UNSIGNED.

QS40096

If a field references a field that has an EDTCDE or an EDTWRD keyword specified, can the EDTCDE or EDTWRD from the Referenced field ignored ?

AS40096

Yes, by using DLTEDT keyword.

Q3S2001

What does the keyword UNIQUE mean ?

A3S2001

Records with duplicate key values are not allowed.

Q3S4002

State three different methods of maintaining access paths ?

A3S4002

Immediate, Rebuild & Delay.

DISPLAY FILES

QS20097

What are the different types of keywords in display files ?

AS20097

File level, Record format level, Field level.

QO30098

What is the maximum number of records you can specify in a display file ?

AO30098

1024.

QS40099

How can a screen field that has changed since the last output operation

What would be the effect on the field where reverse image, underline

AS40099

be detected ? Attach the MDT attribute to the field, to detect whether field has been

QS50100

changed as a result of user input.

AS50100

and highlight display attributes are active ? The result is same as if you had specified ND.

QL40101

What is the use of DSPATR(MDT) keyword ?

If DSPATR(PC) and CSRLOC were specified for a format, which

AL40101

Sets on the modified Data Tag of the field. This Data Tag detects

QO30102

whether the field has been changed as a result of user input.

A030102

keyword would have priority ? CSRLOC gains priority.

QS40103

Can error messages as a result of a COMP, RANGE or VALUES

AS40103

keyword be overridden ? Yes, through CHKMSGID keyword.

QL40104

What is the purpose of OVRDTA and OVRATA keywords ?

AL40104

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.

QS30105

How can a message from a message file appear as a constant on the

AS30105

screen ? By using MSGCON (message constant) keyword.

QS30106

In conjunction with what other keyword must OVRDTA and OVRATA

AS30106

be used ? PUTOVR keyword must be used.

QS50107

How can a field that is larger than what could fit onto one line be

AS50107

truncated from the last blank rather than from the last character position? Using BLKFOLD keyword.

QS40108

What is the purpose of the INDARA keyword ?

AS40108

This File-level keyword is used to remove option and response

QL40109

indicators from the buffer and places them in 99-byte separate indicator area.

AL40109

Explain the purpose of KEEP and ASSUME keywords ? KEEP : Keep the display from being deleted when the display file is

QS30110

closed. ASSUME : It is used to specify that the OS/400 program is to assume that this record is already shown on the display when this file is opened.

AS30110

Explain the use of DFRWRT display keyword ? No records will be displayed until there is an I/O operation.

QS30111

What is the purpose of FRCDTA keyword ?

What keyword must be used with PROTECT keyword ?

AS30111

Immediately display a record format without waiting for the next I/O

QS10112

operation.

AS10112

OVERLAY

QS30113

Where is the variable for the SLNO(*VAR) keyword be defined ?

AS30113

At run time before displaying the record format.

QS50114

Under what conditions would a field where the ERRMSG keyword

AS50114

was active would not be displayed in reverse image ? If it is an output-only field or input capable field with display attributes UL, HI are active.

QS50115

When will the message for field that has the ERRMSG keyword active

AS50115

not be displayed ? If more than one ERRMSG keywords are active then the first will be active, because only one error message will be displayed at a time.

QL50116

What is CHGINPDFT keyword, and what will be the effect if you define this keyword at file with out any parameter values ?

AL50116

This file, record or field level keyword is used to change one or more input defaults for input capable fields. If you define this keyword at file level without any parameter then the underline will be suppressed.

QS30117

In what case control will be passed back to the program when the last character of the field is keyed ?

AS30117

CHECK(ER)

ER - End of Record.

SUBFILES :

QL10118

What is a subfile ?

What are the contents of subfile ?

AL10118

Subfile is a group of records of same record format and can be read

QL30119

from or write to the display in a single operation.

AL30119

Subfile Record Format, Subfile Control Record Format, Relative

QS20120

Record Number, Subfile Record Number, Associated Subfile Keywords.

AS20120

What are the two record formats that a subfile contains ? Subfile record format(SFL), and subfile control record

What is SFLPAG and SFLSIZ ?

QL30121

format(SFLCTL).

AL30121

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.

QO30122

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

AO30122

512

QO30123

The maximum number of subfiles that can defined in a RPG program for one display file is

AO30123

24

QO30124

The maximum number of subfiles that can be active for a single file is

AO30124

12

QL20125

What are the different opcodes used for file operation on a subfile in a

AL20125

RPG Program ? READ, READC, CHAIN, UPDAT and WRITE

QS30126

Can more than one subfile record be displayed on one line ?

AS30126

Yes, by using SFLLIN keyword.

QS30127

How do you specify the number of records to roll in a subfile ?

How will you display a particular page in subfile ?

How to pick up the changed records every time in a subfile after the

AS30127

Use SFLROLVAL keyword in DDS along with the number, which

QL30128

specifies the number of records to scroll at a time.

AL30128

Move a valid relative record number(RRN) in the field specified using

QS30129

SFLRCDNBR keyword in DDS.

AS30129

first change made ? Seton SFLNXTCHG keyword indicator and update the subfile record.

QS30130

What is the use of the SFLEND keyword ?

How do you toggle between single line and multi-line display of a

AS30130

By specifying this keyword, the Bottom/More message could be

QS30131

displayed at end of screen.

AS30131

particular record in a subfile ? Using SFLDROP keyword.

QL40132

Explain the difference between defining Subfile and Message-subfile ?

Can a single screen format occupy a screen area above and below a

AL40132

A subfile record is defined by SFL keyword, whereas a message

QO30133

Subfile is defined by SFLMSG keyword.

AO30133

subfile format ? Not possible.

QS50134

How can a program be prevented from failing over when READC is performed on an empty subfile ?

AS50134

Check indicator placed in position LO, which will be seton if EOF reached.

 

CONTROL LANGUAGE (CL/400)

QO10135

How to start a CL program ?

AO10135

PGM.

QO20136

How many files can be declared in CL ?

AO20136

One.

QO30137

Which precedes, the file declaration or variable declaration ?

AO30137

Variable declaration and then File declaration.

QS10138

What are the different types of variables available in CL ?

AS10138

DEC, CHAR, LGL

QO10139

In CL Program '&' precedes

AO10139

Variables.

QO10140

How do you pass parameters in CL ?

AO10140

Using PARM keyword.

QO20141

Can libraries be added to the library list through CL ?

AO20141

Yes, using ADDLIBL.

QL50142

What is the difference between CAT, TCAT and BCAT ?

AL50142

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.

QO10143

How do you end a CL program ?

AO10143

ENDPGM

QS30144

What are the different types of messages in CL ?

How can errors be trapped in a CL program?

AS30144

Immediate message, Break message, Program message, User

QS30145

message.

AS30145

By using Monitor Message Command ( MONMSG )

QO30146

What is the maximum length of a variable name in CL ?

AO30146

Maximum 11 characters (including '&')

QL50147

What are the limitations of CL (compare to RPG) ?

AL50147

You cannot use CL program to :

ADD or UPDATE records in database files

RPG/400

Use Printer or ICF files

Use Program described files

Use the concept of subfile (to display more than one record),

but a single output message subfile is a special type of subfile that is supported well in CL Use subroutines.

You cannot declare more than one object (file) in a CL

 

programme.

QS10148

What is RPG ?

AS10148

Report Program Generator.

QL30149

What are the positive points of RPG Language ?

AL30149

Contains opcodes which makes it flexible with OS/400 Can access the externally described file.

QL50150

Explain RPG Program Logic Cycle ?

AL50150

START
START

Perform detail calculation

Logic Cycle ? AL50150 START Perform detail calculation Perform header, detail output Read a record Set
Perform header, detail output
Perform header, detail output

Perform header, detail output

Perform header, detail output Read a record Set ON LR if EOF If change in control
Perform header, detail output Read a record Set ON LR if EOF If change in control
Perform header, detail output Read a record Set ON LR if EOF If change in control
Perform header, detail output Read a record Set ON LR if EOF If change in control
Perform header, detail output Read a record Set ON LR if EOF If change in control
Read a record Set ON LR if EOF If change in control field, set ON

Read a record Set ON LR if EOF If change in control field, set ON control level indicators.

If change in control field, set ON control level indicators. Move data from selected record into

Move data from selected record into processing area

Move data from selected record into processing area Perform total calculations Perform total output If LR

Perform total calculations Perform total output If LR is ON then END program

QS30151

When is it efficient to make use of RPG Cycle ?

Can you call a program in your RPG program, which is coded in some

AS30151

When the file is arranged in sequence and output is based on control

QS20152

break.

AS20152

other language ? Yes, Any program object available on AS/400.

QL20153

What are the different types of specification available in RPG/400 ?

AL20153

Control Spec.( H )

QO40154

File Spec.( F ) Extension Spec.( E ) Line counter Spec.( L ) Input Spec.( I ) Calculation Spec.( C ) Output Spec.( O )

AO40154

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

QS20155

What is the use of H spec. in RPG ?

When will DUMP and DEBUG opcodes be ignored ?

AS20155

It identifies by H in column 6, Provides information about generating

QS50156

and running programs.

AS50156

If blank is specified in position 15 of H specs.

QS20157

What are the valid file types ( position 15 ) in F specification ?

AS20157

I (Input file).

O

(Output file).

U

(Update file).

C

(Combined (I/O) file).

QL40158

Specify different indicators used in RPG ?

AL40158

Overflow indicators. Record Identifying Indicators. Field Indicators. Resulting Indicators. Control Level Indicators.

QL40159

What are Control level indicators ?

AL40159

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.

QS20160

What is the use of E specification in RPG ?

AS20160

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

QS30161

What is the use of L specs in RPG ?

In which specification can a report layout be defined ?

AS30161

Line counter specification can be used to describe printer file to

QS10162

indicate the length of the form and number of lines per page.

AS10162

O Specification.

QO30163

How many files can be defined in F specs ?

AO30163

A maximum of 50 files.

QO30164

How many printer files can be defined in F specs ?

AO30164

A maximum of 8 files.

QS20165

Give three main purposes of File specification ?

How do you specify page overflow indicator for printer files in RPG ?

AS20165

To define files, to describe the files, to assign the files to specified

QS20166

devices.

AS20166

Specify an indicator in positions 33-34 of F specification.

QS20167

What is a Primary File ?

Can an indexed file be accessed in arrival sequence in RPG program ?

AS20167

It is used in RPG Program Cycle to automatically read records in a

QO30168

cycle.

AO30168

Yes.

QS20169

What is a program described file in RPG ?

What is an externally described file ?

AS20169

The field name and length of the fields are defined with in the RPG

QS20170

program.

AS20170

All information about the fields is specified in DDS and the RPG program can use them with in the program.

QO30171

Can you specify a display file to be used in the following modes:

AO30171

Input, Output or Combined modes? Yes.

QL40172

What are match fields indicators?

AL40172

Matching record indicator is seton when all the matching fields in the

QO20173

record of a secondary file matches with all the matching fields of a record in a primary file.

AO20173

What is the length of a variable in RPG ? 6 Characters.

QS10174

What are the different arithmetic Opcodes ?

AS10174

ADD, SUB, MULT, DIV, MVR, SQRT, XFOOT, Z-ADD, Z-SUB.

QS10175

When is a TAG statement used in RPG ?

AS10175

It is used as a Label.

QL30176

What are the different Opcodes available in RPG for Database access ?

AL30176

READ, CHAIN, WRITE, UPDAT, DELET, SETLL, SETGT,

QS10177

READE, READP, REDPE, OPEN, CLOSE, FORCE, NEXT, UNLCK.

AS10177

What is READP opcode ? Read previous record.

QS10178

What is REDPE opcode ?

AS10178

Read Prior equal record.

QO30179

How do you check if a division was whole division ?

AO30179

Check the EQ indicator be set to '1'

QO30180

What opcode could be used to test an alphanumeric field for all

AO30180

numeric values? TESTN.

QO30181

What opcode will be used to test the zone of a character field ?

AO30181

TESTZ.

QS40182

How do you specify Half Adjust ?

AS40182

It should be specified in the column 53 of C specs as 'H' to indicate

QL30183

half adjust. It will be effective only if the resultant value is having more decimals than the result field.

AL30183

Explain the difference between READ, CHAIN and SETLL ? READ operation reads the record currently pointed to, from a full procedural file.

CHAIN operation retrieves a record from a full Procedural file, sets a record identifying indicator ON and places the data in the input fields. SETLL operation position a file at the next record that has a key or relative record number that is greater than or equal to the search argument specified. The file must be fully procedural for all three opcodes.

QL30184

What does LO and EQ indicators signify in READ, WRITE and

How can database records be read without lock ?

AL30184

CHAIN operations ? LO indicator specifies the error status on the above operations.

QS30185

EQ indicator specifies the EOF, Record not found.

AS30185

Put 'N' in position 53 of C specs.

QL20186

What is the difference between MOVE and MOVEL ?

AL20186

MOVE operation will transfer characters from the factor 2 to the result

QS20187

field, the move starts from rightmost character of factor 2. MOVEL operation will transfer characters from factor 2 to the result field, the move starts from leftmost character of factor 2.

AS20187

How do you concatenate two string variables in RPG ? Using CAT opcode or with MOVE followed by MOVEL.

QL30188

What are the string operations possible in RPG/400 ?

AL30188

CHECK, CHEKR, SUBST, CAT, XLATE, SCAN.

QS10189

What does SUBST do ?

AS10189

Extracts a specified character string from a base character string.

QS20190

What does CHECK opcode do ?

AS20190

The check operation verifies that each character in the base string

QS10191

(factor 2) is among the character indicated in the comparator string(factor 1).

AS10191

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

QS10192

What is the difference between DOU and DOW ?

AS10192

DOU checks after entering into the loop, it is performed atleast once. DOW check before entering into the loop.

QL20193

What is ITER and LEAVE opcodes do ?

AL20193

ITER transfers control from within a DO group to the ENDDO statement of the DO group. It causes the next iteration of the loop to be executed immediately LEAVE operation transfers control from within a DO group to the statement following the ENDDO operation.

QL20194

Which instructions support structured programming in RPG ?

What does 'SR' in columns 7-8 of C specs mean ?

AL20194

ANDxx, CASxx, DO group, ELSE, ENDyy, IFxx, ITER, LEAVE,

QS10195

ORxx, OTHER, SELEC, WHxx.

AS10195

Calculation operation is a part of RPG subroutine.

QL20196

Explain CASxx, and CABxx statements ?

CABxx operation compares factor 1 with factor 2 , if the condition

AL20196

CASxx operation allows you to conditionally select a subroutine for

processing. The condition is based on the relationship between factor 1 and factor 2 as specified by xx.If the relationship is true the subroutine specified in the result field is processed.

specified by xx is true, the program branches to the TAG operation associates with the label specified in the result field.

QL30197

What is CLEAR and RESET ?

AL30197

CLEAR operation sets the elements in a structure (record format,

QL40198

array/table, data structure) or a variable (field, subfield or indicator) to zero , blank or '0' depending on the field type (numeric, character, indicator) RESET operation sets the elements in a structure (record format, array/ table, data structure) or a variable (field, subfield or indicator) to its initial value.

AL40198

What is SCAN and XLATE ? SCAN operation scans a character string (base string) contained in

QL40199

factor 2 for a substring (compare string) contained in factor 1. XLATE operation translates characters in source string (factor 2) to the from and to strings(factor 1) and put into the result field.

AL40199

How do you use commitment control in RPG program ? Using COMIT operation. Makes all changes to the files that have been specified in output operation since the previous COMIT or the beginning of operations under commitment control(if there has been no previous COMIT or ROLBK operation).

QS30200

How do you use exceptional write in C specs ?

AS30200

Using EXCPT opcode.

QL30201

What does the opcode FREE do ?

AL30201

The FREE operation removes a program from the list of activated

QS30202

programs, frees static storage and ensures program initialization (first cycle processing) the next time program is called. It does not close file or unlock data area.

AS30202

What does opcode POST do? Puts information in INFDS.

QS20203

What is the difference between WRITE and EXFMT of a display file ?

What is the difference between PLIST and KLIST ?

AS20203

WRITE displays a record format on workstation,

QS20204

EXFMT displays and accepts from the workstation.

AS20204

PLIST operation defines a unique symbolic name for a parameter list

QO30205

to be specified in a CALL operation. KLIST is a declarative operation that gives a name to a list of key fields.

AO30205

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

QS40206

What are the different types of arrays available in RPG ?

AS40206

Pre-run time array.

QL40207

Compile time array. Run time array.

AL40207

How do you specify data for a compile time array ? You can specify in E specs about the no of entries per record, no of elements, length of each element with the corresponding data entered at the end of the RPG program starting with **.

QO30208

What is the maximum number of elements in an array ?

AO30208

9999.

QO30209

Can we define Multi-dimensional arrays in RPG ?

AO30209

No.

QS20210

What is XFOOT opcode ?

AS20210

Adds all the elements in a numeric array, and places the sum in the result field.

QS20211

How can we sort an array ?

AS20211

By using SORTA opcode.

QS20212

What is MOVEA opcode do ?

AS20212

Transfer character to numeric values from factor 2 to result field.

QS20213

MOVEA can be possible to ARRAY-ARRAY, ARRAY-FIELD, or FIELD-ARRAY.

AS20213

How to initialize an array ? CLEAR or MOVEA *blanks to array.

QS20214

What is LOKUP opcode do ?

AS20214

LOKUP opcode search for a particular element in an array / table.

QS20215

Can LOKUP operation be used for unsorted array ?

AS20215

Yes.

QL20216

What is the difference between an array and a table ?

AL20216

An array elements can be refered by array name.

QO30217

Elements in array can be accessed by their position relative to other elements. Table name does not refer to the entire set of table elements. Elements in a table can not be accessed by their position relative to the other elements.

AO30217

What is the maximum length of a table name ? 6 characters.

QO20218

What is the syntax of a table name ?

AO20218

Table name should start with TAB.

QS30219

How can the user implicitly open and close the files in RPG program ?

AS30219

Enter UC in position 71-72 of F specs.

QO20220

Use OPEN and CLOSE opcodes in RPG program to open and close files.

AO20220

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

QS20221

What is the significance of DEFN opcode on RPG ?

AS20221

To define fields based on the attributes of another field. To define a field as a data area.

QS20222

What are different ways by which you define working storage field ?

AS20222

Explicitly define or use *Like DEFN.

QO30223

How many parameters can be defined in a RPG program?

AO30223

Max. 255.

QL40224

What are the different ways of ending an RPG program without a

RETRN.

AL40224

primary file ? SETON LR.

SETON H1 to H9 (halt indicators). SETON RT.

By allowing an exception / error to end the program if

.

No exception / error subroutine is specified

.

No return point is specified on an exception or error subroutine

.

The user's response is to cancel the program.

QL40225

Specify different ways by which RPG program can give error message

If you are trying to add a record in a file and an error is displayed,

AL40225

to user? By calling the SUBR23R3 program as passing message id.

QL50226

By defining the error message in DSPF.

AL50226

where do you look for error ? Check whether you have opened the file in Update mode. Check whether you have specified 'A' in position 72 of F specs.

QL50227

What is a File Information Data Structure ?

AL50227

File Information Data structure (INFDS) can be defined for each file to make file exception/error information available to the program. A file information data structure contains predefined subfields that identify:

.

The name of the file for which the exception/error occurred

The record being processed when the exception/error occurred or the record that caused the exception/error

.

.

The last operation being processed when the exception/error occurred

.

The status code

.

The RPG routine in which the exception/error occurred.

QL50228

What is Program Status Data Structure ?

AL50228

A program status DS can defined to make program exception/error

information available to an RPG program. DS is defined as a program status DS by an S in position 18 of the DS

statement.

*STATUS contains status code

*ROUTINE contains name of routine in which the exception/error occurred. *PARMS contains the number parameters passed to this program from the calling program. Specify heading information/TITLE. Specify to begin on a fresh page/EJECT. To control line spacing/SPACE. Records to be inserted from other files at the point where it is specified/COPY.

QO30229

What is the maximum no. of times multiple occurrence DS can occur

in

a program ?

AO30229

9999.

QL30230

What is the difference between *LIKE and *NAMVAR ?

AL30230

*LIKE defines the variables as in database. *NAMVAR is used to define variables as data area.

QL30231

AL30231

How is embedded SQL used in RPG ? /EXEC SQL

+ SQL statements

+ --------------------

-------------------- /END EXEC

+

QS30232

What are all the compiler directive statements ?

AS30232

/TITLE, /EJECT, /SPACE, /COPY.

QS40233

How can RPG program send message to System Operator ?

AS40233

Use QCMDEXC as called program in the CALL statements, and use SNDPGMMSG to the operator.

QL50234

Where DBCS data will be used in RPG ?

AL50234

In any comment statement

In comment field of E and C Specs

In literals and constants

As data in any character field, subfield, array or table.

QS40235

Where will control be passed after the execution of the *PSSR

AS40235

subroutine if the factor 2 of the ENDSR is blank ? Control will return to the next sequential instruction.

QS40236

How can the CPF error-id be retrieved when a program error occurs ?

How could indicators 50 to 99 be set to '0' in one instruction ?

AS40236

CPF error codes are placed in the subfield location *STATUS for the

QS30237

program status DS.

AS30237

Using 'MOVEA *ZEROS IN,50' .

QL30238

What are the figurative constants ?

'X

the implied length and decimal positions of a figurative constant are

are implied literals that can be supplied without a length, because

AL30238

*BLANK/*BLANKS, *ZERO/*ZEROS, *HIVAL, *LOVAL, *ALL

'

The same as those of the associated field.

QO30239

What is the maximum error severity for which the compilation of RPG

AO30239

program stops ? 50, if LR is not seton.

Q6S2001

What are the earlier versions of RPG ?

A6AS2001

RPG II & RPG III.

Q6L4002

Name the different ways by which RPG source program can be entered ?

During input operation which indicator position is seton if the record is

A6L4002

Interactively with SEU, In batch by using either OS/400 or Spooling

Q6O3003

functions.

A6O3003

locked ? Position 56 - 57 (LO).

Q6O5004

What is the record lock status value ?

A6O5004

Status value is 01218.

 

MISCELLANEOUS

QO30240

How do you combine two record formats in RLU ?

AO30240

Using CLC.

QO30241

How do you split record formats in RLU ?

AO30241

Using CLR.

QO20242

What is the use of SDA ?

AO20242

Screen Design Aid is used to create display files interactively.

QO40243

How do you define overlapping fields in SDA ?

AO40243

They can be defined through condition indicators.

QS40244

Mention different ways of specifying user help.

AS40244

Through SDA and Panel Group.

QS30245

To which member type does help text for panel belong ?

AS30245

PNLGRP

QO20246

Can Printer files be externally described or program described ?

AO20246

Yes.

QS20247

What are the valid file operation codes for a PRINTER file ?

AS20247

WRITE, OPEN, CLOSE, FEDO.

QS50248

If you use INDARA keyword for a program-described PRINTER file,

AS50248

what will be the result ? You will get run-time error.

QL50249

What is PRTCTL, and where will you define it ?

AL50249

The PRTCTL (Printer Control) option allows you to change forms

Q8S2001

control information and to access the current line value within the program for a program-described PRINTER file. PRTCTL option will be specified on a F specifications continuation line for the PRINTER file.

A8S2001

What is the function of RLU ? To design & prototype a report.

Q8S2002

What are the three types of keywords associated with printer file ?

A8S2002

File level, Record level & Field level.

Q8S2003

What are the three line types in RLU ?

A8S2003

Report line, Filler line & Sample line.

Q8O1004

Which option number is used to invoke RLU ?

A8O1004

Option 19.

Q8L4005

What are the different commands used in RLU ?

A8L4005

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.

Q8O1006

What is the command used to invoke RLU ?

A8O1006

STRRLU.

Q8S1007

What are different record spacing keywords in RLU ?

A8S1007

SKIPA, SKIPB, SPACEA & SPACEB.

Q8L4008

What is job description ?

Job queue (only for batch), job priority, printer to be used, OUTQ & its

A8L4008

A job is an unit of work on the AS/400. Jobs run in a subsystem using

system resources viz. memory, disk, etc. A job can be either interactive or batch. For interactive jobs JOD in User profile is used and for batch jobs JOBD along with SBMJOB is submitted with an object type of job description is *JOBD. Job description is a set of characteristics that define how the system handles a job. It contains:

priority, time slice & run priority. If none of the above is specified the system used the default job description.

Q8L4009

Define a sub system?

Specifies the program to be called to control a routing step. WORK

A8L4009

Sub system is an operating environment, defined by a sub system

description. All user jobs are processed in the sub system. Eg.QBASE, QBATCH, QCTL, QINTER, etc. Sub system description defines the characteristics of a sub system. ROUTING ENTRY:

ENTRY: Source from which jobs can be accepted. WORK STATION ENTRY: Display stations from which users can log into the sub system.

Q8L4010

Open query file [OPNQRYF]?

A8L4010

Open query file (OPNQRYF) selection can be on:

* Dynamic record selection

* Dynamic keyed sequence

* Dynamic join

* Unique key processing

* Group processing

* Final total processing

* Improve performance

Query access path will be implemented through the following objects

* CL program containing an OPNQRYF to open access path at runtime

* OS/400 physical file used to compile programs [dummy PF] used at runtime

* OS/400 logical file defines the key to OPNQRYF command

Q8L4011

Override database [OVRDBF] ?

A8L4011

Override database [OVRDBF] lets to override the filenames or

Q8L4011

attributes of file selected when we compile/run program. Overrides can be used to change most of the attributes. To cancel the override database command we shall have to give delete override databases DLTOVR.

A8L4011

How do you pass numeric parameters for submitjob ? Convert numeric parameters to character and pass, or.pass in hexadecimal format ( x’0nf’ if ‘n’ contains odd number of digits x’nf’ if ‘n’ contains even nunber of digits)

APPENDIX - A

The coding methodology to be followed to code questions & answers that are to be added to this question bank is described below.

CODE STRUCTURE :

ABCDnnn.

A - A indicates whether the code is a question or an answer. The possible values are :

Q - Question.

A - Answer.

B - B indicates the topic under which the question/answer falls. The possible values are :

1 - AS/400 SYSTEM.

2 - OS/400

3 - DATABASE FILES

4 - DISPLAY FILES

5 - CL/400

6 - RPG/400

7 - COBOL/400

8 - MISCELLANEOUS

C - C indicates the question/answer type. The possible values are :

O

- Objective type.

S

- Short answers.

L

- Long answers.

D - D indicates the complexity level of the question/answer. The possible values are :

Complexity levels 1/2/3/4/5 ( Where complexity level increases from 1 - 5 )

nnn - These represent the numeric sequence.