AS/400 Interview Questions Answers-section 8
How do you pass parameters in CL?
Ans:Using PARM keyword.
What are the valid user defined data area types?
Ans:CHAR, NUMERIC and LOGICAL
What is Multi-format logical file?
Ans:Logical which uses fields from two or more physical files.
What is the Select and Omit criteria in logical file?
Ans:This is used to specify rules for the Selection/Omission of records from a Physical File.
Can fields be concatenated INa logical file level?
Ans:Yes. by using CONCAT keyword
When would the ALL keyword be used?
Ans:Use with Select or Omit, to select/omit records.
What are the different types of keywords in display files?
Ans:File level, Record format level, Field level
What is difference between CAT, TCAT, BCAT?
Ans:
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.
What are the different types of messages in CL?
Ans:Immediate message, Break message, Program message, User message
How to trap errors in CL?
Ans:By using Monitor Message Command (MONMSG)
What is the maximum length of a variable name in CL?
Ans:Maximum 11 characters (including '&')
What are the limitations of CL (compare to RPG) ?
Ans:You can not use CL program to ADD or UPDATE records in database files.
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.
What is the use of Header Specification in RPG/400?
Ans:It identifies by H in column 6, provides informaion about generating and running programs.
When will DUMP and DEBUG opcodes be ignored?
Ans:If blank is specified in position 15 of H specs.
Specify different indicators used in RPG?
Ans:Overflow indicators
Record Identifying Indicators
Field Indicators
Resulting Indicators
Control Level Indicators
What are Control level indicators?
Ans: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.
What is the use of E specification in RPG?
Ans:Extension Specs describes all record address files, arrays and tables.
What is the use of L specs in RPG?
Ans:Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page.
In which specification the report layout can be defined?
Ans:O Specification.
How many files can be defined in F specs?
Ans:50
How many printer files can be defined in F specs ?
Ans:8
What is the maximum number of records you can specify in a display file?
Ans:1024
How can a screen field that has changed since the last output operation be detected ?
Ans:Attach the MDT (modified data tag) attribute to the field, to detect whether field has been changed as a result of user input.
What would be the effect on the field where reverse image, underline and highlight display attributes were active?
Ans:The result is same as if you had specified ND.
What is the use of DSPATR(MDT) keyword?
Ans:Sets on the modified Data Tag of the field. The Data Tag detect whether the field has been changed as a result of user input.
If DSPATR(PC) and CSRLOC were specified for a format, which keyword would have priority?
Ans:CSRLOC gains priority.
Can error messages as a result of a COMP, RANGE or VALUES keyword be overridden?
Ans:Yes, through CHKMSGID keyword.
What the purpose of OVRDTA, OVRATA keywords?
Ans:OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display.
OVRATA keyword (field or record level) can be used to override the existing display attributes of a field or record already on the display.
How can a message from a message file appear as a constant on the screen?
Ans:By using MSGCON (message constant) keyword.
In conjunction with what other keyword must OVRDTA and OVRATA be used?
Ans:PUTOVR keyword must used.
What is the purpose of the INDARA keyword?
Ans:This File-level keyword is used to remove option and response indicators from the buffer and places them in 99-byte separate indicator area.
Explain the purpose of KEEP and ASSUME keywords?
Ans:KEEP: Keep the display from being deleted when the display file is 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.
Explain the use of DFTWRT display keyword?
Ans:No records will be displayed until there is any I/O operation.
What is the purpose of FRCDTA keyword ?
Ans:Immediately display a record format without waiting for the next I/O operation.
What keyword must be used with PROTECT keyword?
Ans:OVERLAY
What is Subfile?
Ans:Subfile is group of records of same record format and can be read from or write to the display in a single operation.
What are all the contents of subfile?
Ans:Subfile Record Format, Subfile Control Record Format, Relative Record Number, Subfile Record Number, Associated Subfile Keywords.
What are the two record formats a subfile contain ?
Ans:Subfile record forma (SFL), and subfile control record forma (SFLCTL).
What is SFLPAG and SFLSIZ ?
Ans:
SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.
SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile.
What is the maximum number of subfiles that can be specified in a display file,
Ans:512
Maximum number of subfiles that can Defined in a RPG program for one display file is
Ans:24
Maximum number of subfiles that can be active for a single file is?
Ans:12
Can more than one subfile record be displayed on one line?
Ans:Yes, by using SFLLIN keyword.
How do you specify the number of records to roll in a subfile?
Ans:Use SFLROLVAL keyword in DDS along with number, which specifies the number of records to scroll at a time.
How will you display a particular page in subfile?
Ans:Move a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS.
How to pick up the changed records every time in a subfile after the first change made?
Ans:Seton SFLNXTCHG keyword indicator and update the subfile record.
What is the use of SFLEND keyword?
Ans:By specifying this keyword, the Bottom/More message could be displayed at end of screen.
How to toggle between single line and Multi - line display of a particular record in a subfile?
Ans:Using SFLDROP keyword.
Explain the difference between defining Subfile and Message-subfile?
Ans:Subfile record is defined by SFL keyword, where as Message subfile is defined by SFLMSG keyword.
What are the different types of variables available in CL?
Ans:DEC, CHAR, LGL
How do you pass parameters in CL?
Ans:Using PARM keyword.
What are the valid user defined data area types?
Ans:CHAR, NUMERIC and LOGICAL
What is Multi-format logical file?
Ans:Logical which uses fields from two or more physical files.
What is the Select and Omit criteria in logical file?
Ans:This is used to specify rules for the Selection/Omission of records from a Physical File.
Can fields be concatenated INa logical file level?
Ans:Yes. by using CONCAT keyword
When would the ALL keyword be used?
Ans:Use with Select or Omit, to select/omit records.
What are the different types of keywords in display files?
Ans:File level, Record format level, Field level
What is difference between CAT, TCAT, BCAT?
Ans:
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.
What are the different types of messages in CL?
Ans:Immediate message, Break message, Program message, User message
How to trap errors in CL?
Ans:By using Monitor Message Command (MONMSG)
What is the maximum length of a variable name in CL?
Ans:Maximum 11 characters (including '&')
What are the limitations of CL (compare to RPG) ?
Ans:You can not use CL program to ADD or UPDATE records in database files.
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.
What is the use of Header Specification in RPG/400?
Ans:It identifies by H in column 6, provides informaion about generating and running programs.
When will DUMP and DEBUG opcodes be ignored?
Ans:If blank is specified in position 15 of H specs.
Specify different indicators used in RPG?
Ans:Overflow indicators
Record Identifying Indicators
Field Indicators
Resulting Indicators
Control Level Indicators
What are Control level indicators?
Ans: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.
What is the use of E specification in RPG?
Ans:Extension Specs describes all record address files, arrays and tables.
What is the use of L specs in RPG?
Ans:Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page.
In which specification the report layout can be defined?
Ans:O Specification.
How many files can be defined in F specs?
Ans:50
How many printer files can be defined in F specs ?
Ans:8
What is the maximum number of records you can specify in a display file?
Ans:1024
How can a screen field that has changed since the last output operation be detected ?
Ans:Attach the MDT (modified data tag) attribute to the field, to detect whether field has been changed as a result of user input.
What would be the effect on the field where reverse image, underline and highlight display attributes were active?
Ans:The result is same as if you had specified ND.
What is the use of DSPATR(MDT) keyword?
Ans:Sets on the modified Data Tag of the field. The Data Tag detect whether the field has been changed as a result of user input.
If DSPATR(PC) and CSRLOC were specified for a format, which keyword would have priority?
Ans:CSRLOC gains priority.
Can error messages as a result of a COMP, RANGE or VALUES keyword be overridden?
Ans:Yes, through CHKMSGID keyword.
What the purpose of OVRDTA, OVRATA keywords?
Ans:OVRDTA keyword (field or record level) can be used to override the existing data contents of a field or record already on the display.
OVRATA keyword (field or record level) can be used to override the existing display attributes of a field or record already on the display.
How can a message from a message file appear as a constant on the screen?
Ans:By using MSGCON (message constant) keyword.
In conjunction with what other keyword must OVRDTA and OVRATA be used?
Ans:PUTOVR keyword must used.
What is the purpose of the INDARA keyword?
Ans:This File-level keyword is used to remove option and response indicators from the buffer and places them in 99-byte separate indicator area.
Explain the purpose of KEEP and ASSUME keywords?
Ans:KEEP: Keep the display from being deleted when the display file is 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.
Explain the use of DFTWRT display keyword?
Ans:No records will be displayed until there is any I/O operation.
What is the purpose of FRCDTA keyword ?
Ans:Immediately display a record format without waiting for the next I/O operation.
What keyword must be used with PROTECT keyword?
Ans:OVERLAY
What is Subfile?
Ans:Subfile is group of records of same record format and can be read from or write to the display in a single operation.
What are all the contents of subfile?
Ans:Subfile Record Format, Subfile Control Record Format, Relative Record Number, Subfile Record Number, Associated Subfile Keywords.
What are the two record formats a subfile contain ?
Ans:Subfile record forma (SFL), and subfile control record forma (SFLCTL).
What is SFLPAG and SFLSIZ ?
Ans:
SFLPAG : it is an attribute which specifies the number of records that can be displayed in a screen.
SFLSIZ : it is an attribute which specifies the number of records can be stored in subfile.
What is the maximum number of subfiles that can be specified in a display file,
Ans:512
Maximum number of subfiles that can Defined in a RPG program for one display file is
Ans:24
Maximum number of subfiles that can be active for a single file is?
Ans:12
Can more than one subfile record be displayed on one line?
Ans:Yes, by using SFLLIN keyword.
How do you specify the number of records to roll in a subfile?
Ans:Use SFLROLVAL keyword in DDS along with number, which specifies the number of records to scroll at a time.
How will you display a particular page in subfile?
Ans:Move a valid relative record number (RRN) in the field specified using SFLRCDNBR keyword in DDS.
How to pick up the changed records every time in a subfile after the first change made?
Ans:Seton SFLNXTCHG keyword indicator and update the subfile record.
What is the use of SFLEND keyword?
Ans:By specifying this keyword, the Bottom/More message could be displayed at end of screen.
How to toggle between single line and Multi - line display of a particular record in a subfile?
Ans:Using SFLDROP keyword.
Explain the difference between defining Subfile and Message-subfile?
Ans:Subfile record is defined by SFL keyword, where as Message subfile is defined by SFLMSG keyword.
What are the different types of variables available in CL?
Ans:DEC, CHAR, LGL