Rpgle runs in Integrated Language Environment and supports longer file/field names. Coding can be done using built-in functions. RPG stands for Report Program Generator, it is a programming language. It is IBM product and used only in IBM i- based systems. It is developed to replace the punched cards system. The latest version is RPG IV which is suitable for modern development. Having experienced in Rpgle is very helpful in giving preference to you. There are number of positions available across all the locations. Wisdomjobs focus on providing interview questions and answers to help you in clearing the interview with ease. Rpgle interview questions and answers are useful to attend job interviews and get shortlisted for job position. Check out interview questions page to get more information.
Question 1. Advantages Of Ile Or Rpg?
Answer :
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.
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.
Question 4. 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.
Question 5. 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.
Question 6. What Is Sflcsrrrn And Sflrcdnbr ?
Answer :
Question 7. 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
Question 8. Reading Records From A Subfile Using Readc?
Answer :
With the help of READC opcode we can read only changed records from subfile.
Question 9. 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.
Question 10. Plist And Klist ?
Answer :
PLIST is a list of parameter and KLIST is the list of KEY fields.
Question 11. 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.
Question 12. 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.
Question 13. Different Operations On Indicator?
Answer :
There are only two operations on indicator those are SETON and SETOFF.
Question 14. What Is The Operation / Op-code To Change In File?
Answer :
In RPG/RPGLE with the help of UPDAT / UPDATE op-code.
Question 15. How Do I Insert A Record Into A Database File?
Answer :
Question 16. Two Way Of Deleting Records From File?
Answer :
One is DELETE and other with the help of O-Specs ADD/DEL specify DEL.
Question 17. 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.
Answer :
Yes. It will retain all the options entered in the previous page.
Question 19. 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.
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.
Question 21. 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.
Question 22. What Are The Built In Function In Rpgle ?
Answer :
Question 23. How To Print Header If O-specs Are Used In Program ?
Answer :
With the help of op-code EXCEPT.
Question 24. 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.
Question 25. How To Go To Pssr?
Answer :
Whenever an exception/error occurs and *PSSR is declared in F-specs, it is automatically goes to PSSR.
Question 26. Can We All *pssr If No Exception Occurs? What Happen It Is Called ?
Answer :
Yes, Whatever the statements specified are executed.
Answer :
INFDS is a File Information Data Structure.
Question 28. 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.
Question 29. What Is Procedure?
Answer :
A procedure is the set of self contained high level language statements that can perform a particular task and then returns to a caller.
Question 30. How To Define Global Parameter In Ile ?
Answer :
Declare a variable with key word EXPORT and while using this variable in another program declare with IMPORT keyword.
Question 31. What Is The Disadvantage Of Using Global Variable?
Answer :
We can not trace out at which point the value of variable is changed.
Question 32. What Is Service Program?
Answer :
A Service Program is a collection of runnable procedures and available data items easily accessible by other ILE programs. In many respects it is similar to a subroutine library and procedure library.
A service program differs from a program in two ways:
Question 33. What Is Iso Date Format?
Answer :
YYYY-MM-DD for other formats refer to IBM manual or ERIS document.
Question 34. 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.
Question 35. How To Avoid Using Indicators In Ile ?
Answer :
By using the standard Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…etc.
Rpgle Related Tutorials |
|
---|---|
IBM - RPG Tutorial | IBM - AS/400 Tutorial |
Rpgle Related Interview Questions |
|
---|---|
IBM - RPG Interview Questions | IBM - AS/400 Interview Questions |
IBM Assembler Interview Questions |
Rpgle Related Practice Tests |
|
---|---|
IBM - RPG Practice Tests | IBM - AS/400 Practice Tests |
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.