InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
If We Tried To Move Year Part Of Iso Date Into A Field Of Length 3, What Will Happen? |
|
Answer» Program CRASHES, as in case of ISO FORMAT it REQUIRED fields of 4,2,2. Program crashes, as in case of ISO format it required fields of 4,2,2. |
|
| 2. |
What Is Iso Date Format? |
|
Answer» YYYY-MM-DD for other formats REFER to IBM MANUAL or ERIS document. YYYY-MM-DD for other formats refer to IBM manual or ERIS document. |
|
| 3. |
How To Determine If The Record Is In Used By Another User ? |
|
Answer» We can determine weather a RECORD is in USE bye another USER with the help of status code (*STATUS). If *STATUS = 01218 i.e. record already LOCKED. We can determine weather a record is in use bye another user with the help of status code (*STATUS). If *STATUS = 01218 i.e. record already locked. |
|
| 4. |
What Is Infds? |
|
Answer» INFDS is a FILE Information Data STRUCTURE.
INFDS is a File Information Data Structure. |
|
| 5. |
Can We All *pssr If No Exception Occurs? What Happen It Is Called ? |
|
Answer» YES, WHATEVER the STATEMENTS SPECIFIED are EXECUTED. Yes, Whatever the statements specified are executed. |
|
| 6. |
How To Go To Pssr? |
|
Answer» WHENEVER an exception/error OCCURS and *PSSR is DECLARED in F-specs, it is automatically goes to PSSR. Whenever an exception/error occurs and *PSSR is declared in F-specs, it is automatically goes to PSSR. |
|
| 7. |
What Is *pssr And Infsr? |
|
Answer» It is an exception/error HANDLING routine which is SPECIFIED in F-Sepcs for a file. INFSR(*PSSR), INFSR is an INFORMATION subroutine to SPECIFY the routine name in F-specs. It is an exception/error handling routine which is specified in F-Sepcs for a file. INFSR(*PSSR), INFSR is an information subroutine to specify the routine name in F-specs. |
|
| 8. |
How To Print Header If O-specs Are Used In Program ? |
|
Answer» With the HELP of op-code EXCEPT. With the help of op-code EXCEPT. |
|
| 9. |
What Are The Built In Function In Rpgle ? |
Answer»
|
|
| 10. |
How Will You Achieve Position To In Load All Subfile? |
|
Answer» While loading SUBFILE move RRN, KEY VALUE into a two DIMENSIONAL ARRAY. When a key value is entered into POSITION TO field, having a LOOKUP into an array we can get a corresponding RRN. ASSIGNING RRN value to SFLRCDNBR and then displaying the sub-file. While loading subfile move RRN, KEY VALUE into a two dimensional array. When a key value is entered into POSITION TO field, having a LOOKUP into an array we can get a corresponding RRN. Assigning RRN value to SFLRCDNBR and then displaying the sub-file. |
|
| 11. |
If We Type Some Options On Screen Out Of Which Some Are Invalid And Pressed Enter, What Should Happen? |
|
Answer» It should process all the valid OPTIONS before invalid options ENCOUNTER. Once invalid options is encountered program should STOP processing and DISPLAY ERROR message at the bottom of the screen. It should process all the valid options before invalid options encounter. Once invalid options is encountered program should stop processing and display error message at the bottom of the screen. |
|
| 12. |
How Will You Take Care Of Multiple Options In Case Sub-file? |
|
Answer» We will have to HANDLE it within the PROGRAM USING a READC in a LOOP. We will have to handle it within the program using a READC in a loop. |
|
| 13. |
In Case Of Load All Sub-file, If We Type Options And Then Pgdn,pgup , Will Options Be There On The Display / In Subfile? |
|
Answer» YES. It will RETAIN all the options ENTERED in the PREVIOUS page. Yes. It will retain all the options entered in the previous page. |
|
| 14. |
How To Define A Subroutine ? |
|
Answer» With HELP of two op-code BEGSR(Begin subroutine) ENDSR (END subroutine) and between these two op-codes write the instruction. The WHOLE construct is DEFINED as subroutine. With help of two op-code BEGSR(Begin subroutine) ENDSR (End subroutine) and between these two op-codes write the instruction. The whole construct is defined as subroutine. |
|
| 15. |
Two Way Of Deleting Records From File? |
|
Answer» ONE is DELETE and other with the HELP of O-Specs ADD/DEL SPECIFY DEL. One is DELETE and other with the help of O-Specs ADD/DEL specify DEL. |
|
| 16. |
How Do I Insert A Record Into A Database File? |
| Answer» | |
| 17. |
What Is The Operation / Op-code To Change In File? |
|
Answer» In RPG/RPGLE with the HELP of UPDAT / UPDATE op-code. In RPG/RPGLE with the help of UPDAT / UPDATE op-code. |
|
| 18. |
Different Operations On Indicator? |
|
Answer» There are only TWO OPERATIONS on INDICATOR those are SETON and SETOFF. There are only two operations on indicator those are SETON and SETOFF. |
|
| 19. |
Lr Indicator And Return Operation? |
|
Answer» LR indicator – It close all the open files, Frees the SPACE and release ODP. RETURN – It dose not close files and dose not release the ODP and passes the control to the calling program / command prompt if the program is CALLED from command prompt. LR indicator – It close all the open files, Frees the space and release ODP. Return – It dose not close files and dose not release the ODP and passes the control to the calling program / command prompt if the program is called from command prompt. |
|
| 20. |
Position To Particular Record? |
|
Answer» With help of op-code SETLL from RPG/RPGLE, it will POSITION the record POINTER just before the required record. Next READ will read that particular record. With help of op-code SETLL from RPG/RPGLE, it will position the record pointer just before the required record. Next READ will read that particular record. |
|
| 21. |
Plist And Klist ? |
|
Answer» PLIST is a LIST of parameter and KLIST is the list of KEY fields. PLIST is a list of parameter and KLIST is the list of KEY fields. |
|
| 22. |
Required Key Words For Subfile? |
|
Answer» SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the MANDATORY KEY words. SFLDSPCTL, SFLCLR, SFLINZ, SFLEND are the OPTIONAL key words used in subfile. SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the mandatory key words. SFLDSPCTL, SFLCLR, SFLINZ, SFLEND are the optional key words used in subfile. |
|
| 23. |
Reading Records From A Subfile Using Readc? |
|
Answer» With the HELP of READC opcode we can read only CHANGED RECORDS from SUBFILE. With the help of READC opcode we can read only changed records from subfile. |
|
| 24. |
What Is Sflnxtchg? |
|
Answer» Whenever a record is changed on display file. An MDT is set ON. If an INDICATOR is ASSOCIATED with SFLNXTCHG and it is SETON then READC will READ only the changed record. And if the indicator is not associated and it is seton it READC reads all the records from sub-file Whenever a record is changed on display file. An MDT is set ON. If an indicator is associated with SFLNXTCHG and it is SETON then READC will read only the changed record. And if the indicator is not associated and it is seton it READC reads all the records from sub-file |
|
| 25. |
What Is Sflcsrrrn And Sflrcdnbr ? |
| Answer» | |
| 26. |
What Is Sfldrop And Sflfold? |
|
Answer» These are the two key-words used in sub-file for displaying additional information which cannot FIT one LINE. SFLFOLD will give view in FOLDED FORM and SFLDROP will give view in truncated form. These are the two key-words used in sub-file for displaying additional information which cannot fit one line. SFLFOLD will give view in folded form and SFLDROP will give view in truncated form. |
|
| 27. |
What Are The Sub File Types? |
|
Answer» There are THREE types of sub file : Load All - In which all the records from the Physical file or at max. 9999 records are WRITTEN to subfile. Here sub file SIZE should 9999 or the number of records form PF which ever is less. In this case PAGEUP AND PAGEDOWN is taken care by system. SFLPAG should be less than SFLSIZ. Single Page/non-elastic – In this case sub file size (SFLSIZ) must be equal to sub file page (SFLPAG). For example, if SFLSIZ = 10 and SFLPAG = 10, then 10 records from file are written to subfile. In this case PAG Expandable/elastic/growing – In this case SFLSIZ should be grater at LEAST by 1 than SFLPAG.(this is applicable to Load all type also). For example, SFLSIZ = 10 and SFLPAG=9, then 10 records from written the sub file from physical file but only 9 are displayed on screen. There are three types of sub file : Load All - In which all the records from the Physical file or at max. 9999 records are written to subfile. Here sub file size should 9999 or the number of records form PF which ever is less. In this case PAGEUP AND PAGEDOWN is taken care by system. SFLPAG should be less than SFLSIZ. Single Page/non-elastic – In this case sub file size (SFLSIZ) must be equal to sub file page (SFLPAG). For example, if SFLSIZ = 10 and SFLPAG = 10, then 10 records from file are written to subfile. In this case PAG Expandable/elastic/growing – In this case SFLSIZ should be grater at least by 1 than SFLPAG.(this is applicable to Load all type also). For example, SFLSIZ = 10 and SFLPAG=9, then 10 records from written the sub file from physical file but only 9 are displayed on screen. |
|
| 28. |
Sfl And Sflctl ? |
|
Answer» There are the two mandatory key words for subfile program /design. While SFL is used to define Subfile RECORD FORMAT while SFLCTL is used to define Subfile Control Record format. And this two are the different parts of sub-file. There are the two mandatory key words for subfile program /design. While SFL is used to define Subfile record format while SFLCTL is used to define Subfile Control Record format. And this two are the different parts of sub-file. |
|
| 29. |
What Is Sub-file? |
|
Answer» It is GROUP of records READ from or written to DISPLAY file in a column format. It is ALWAYS a subset of records from physical file hence the NAME subfile. It is group of records read from or written to display file in a column format. It is always a subset of records from physical file hence the name subfile. |
|
| 30. |
Advantages Of Ile Or Rpg? |
Answer»
|
|