AS/400 Interview Questions Answers-section 2
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.
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.