Top 100+ Rpgle Interview Questions And Answers
Question 1. Advantages Of Ile Or Rpg?
Answer :
In RPG it's miles one step compilation (we will get *PGM object) at the same time as in ILE-RPG it is two step compilation (we ought to create a *MODULE after which bind that module to a application.
In RPG we can not call a program i.E. Recursive name isn't supported. While in ILERPG it is supported.
Extended Factor 2
Length of Factor 1 & 2 is expanded to 14 in addition to Length of OP-CODE is 10
Free layout is authorized
Built-in-functions are to be had.
In case of ILE we've the concept of ACTIVATION GROUP.
In ILE EPM (Extended Program Model) is applied even as in RPG OPM (original application version)
Question 2. What Is Sub-report?
Answer :
It is institution of facts read from or written to display report in a column layout. It is usually a subset of information from bodily record as a result the call subfile.
IBM - RPG Interview Questions
Question three. Sfl And Sflctl ?
Answer :
There are the two mandatory key phrases for subfile application /layout. While SFL is used to outline Subfile report format at the same time as SFLCTL is used to define Subfile Control Record format. And this are the different components of sub-document.
Question 4. What Are The Sub File Types?
Answer :
There are three styles of sub report :
Load All - In which all of the statistics from the Physical report or at max. 9999 statistics are written to subfile. Here sub record size ought to 9999 or the wide variety of statistics shape PF which ever is much less. In this situation PAGEUP AND PAGEDOWN is taken care through gadget. SFLPAG should be much less than SFLSIZ.
Single Page/non-elastic – In this example sub record size (SFLSIZ) need to be same to sub record page (SFLPAG). For example, if SFLSIZ = 10 and SFLPAG = 10, then 10 facts from record are written to subfile. In this case PAG
Expandable/elastic/developing – In this situation SFLSIZ ought to be grater at the least by means of 1 than SFLPAG.(this is applicable to Load all type additionally). For instance, SFLSIZ = 10 and SFLPAG=9, then 10 information from written the sub document from bodily record however handiest nine are displayed on display screen.
IBM - RPG Tutorial
Question 5. What Is Sfldrop And Sflfold?
Answer :
These are the two key-phrases utilized in sub-record for showing extra statistics which cannot suit one line. SFLFOLD will give view in folded form and SFLDROP will provide view in truncated form.
IBM - AS/400 Interview Questions
Question 6. What Is Sflcsrrrn And Sflrcdnbr ?
Answer :
SFLCSRRRN will supply the RRN of the file in which the cursor is placed.
SFLRCDNBR will provide the RRN of the First record displayed at the screen at a given time.
Question 7. What Is Sflnxtchg?
Answer :
Whenever a document is changed on display file. An MDT is set ON. If a hallmark is related to SFLNXTCHG and it's far SETON then READC will examine only the modified record. And if the indicator isn't associated and it is seton it READC reads all of the facts from sub-report
IBM - AS/four hundred Tutorial IBM Assembler Interview Questions
Question eight. Reading Records From A Subfile Using Readc?
Answer :
With the assist of READC opcode we are able to read best modified records from subfile.
Question nine. Required Key Words For Subfile?
Answer :
SFL, SFLCTL, SFLDSP, SFLSIZ, SFLPAG are the required key words. SFLDSPCTL, SFLCLR, SFLINZ, SFLEND are the non-compulsory key phrases utilized in subfile.
Question 10. Plist And Klist ?
Answer :
PLIST is a list of parameter and KLIST is the list of KEY fields.
Question eleven. Position To Particular Record?
Answer :
With assist of op-code SETLL from RPG/RPGLE, it'll position the report pointer simply earlier than the required record. Next READ will study that specific report.
Question 12. Lr Indicator And Return Operation?
Answer :
LR indicator – It near all of the open files, Frees the distance and launch ODP.
Return – It dose not close files and dose now not launch the ODP and passes the control to the calling application / command spark off if this system is known as from command set off.
IBM - RPG Interview Questions
Question 13. Different Operations On Indicator?
Answer :
There are simplest 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 assist of UPDAT / UPDATE op-code.
Question 15. How Do I Insert A Record Into A Database File?
Answer :
In RPG / RPGLE with the help of WRITE op-code.
In CL/CLLE we can't insert a file into database record.
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 assist of two op-code BEGSR(Begin subroutine) ENDSR (End subroutine) and among these two op-codes write the coaching. The complete assemble is defined as subroutine.
Question 18. In Case Of Load All Sub-document, If We Type Options And Then Pgdn,pgup , Will Options Be There On The Display / In Subfile?
Answer :
Yes. It will hold all the options entered inside the previous page.
IBM - AS/four hundred Interview Questions
Question 19. How Will You Take Care Of Multiple Options In Case Sub-document?
Answer :
We will ought to deal with it within the software using a READC in a loop.
Question 20. If We Type Some Options On Screen Out Of Which Some Are Invalid And Pressed Enter, What Should Happen?
Answer :
It ought to method all of the legitimate alternatives before invalid alternatives come across. Once invalid options is encountered software have to stop processing and display mistakes message at the bottom of the screen.
Question 21. How Will You Achieve Position To In Load All Subfile?
Answer :
While loading subfile circulate RRN, KEY VALUE right into a two dimensional array. When a key cost is entered into POSITION TO field, having a LOOKUP into an array we will get a corresponding RRN. Assigning RRN fee to SFLRCDNBR after which showing the sub-record.
Question 22. What Are The Built In Function In Rpgle ?
Answer :
SIZE - Gives the size of the variable or literal
PARM – Gives the range of parameter passed to parameter
IPADDR - Gives the address of the process
ADDR - Gives address of the variable
TRIM - Trims the right blanks of the string
TRIM - Trims the Left blanks of the string
REPLACE - Replaces the desired number of characters from the required function.
SUBST - offers a sub string from a variable (%SUBST(X:Y:Z)
ELEM - Gives wide variety of factors or occurrences
INDEX - Change the index of a table or multiple-occurrence information- structure.
LEN – Returns the duration of cost from a field.
CHAR – Converts a Numeric filed to individual.
EOF – End of File.
FOUND – If file is Found.
Question 23. How To Print Header If O-specifications Are Used In Program ?
Answer :
With the assist of op-code EXCEPT.
Question 24. What Is *pssr And Infsr?
Answer :
It is an exception/blunders coping with routine which is laid out in F-Sepcs for a file. INFSR(*PSSR), INFSR is an records subroutine to specify the routine name in F-specifications.
IBM Assembler Interview Questions
Question 25. How To Go To Pssr?
Answer :
Whenever an exception/errors takes place and *PSSR is said in F-specifications, it's miles automatically is going to PSSR.
Question 26. Can We All *pssr If No Exception Occurs? What Happen It Is Called ?
Answer :
Yes, Whatever the statements exact are carried out.
Question 27. What Is Infds?
Answer :
INFDS is a File Information Data Structure.
1 - eight Character *FILE
The first eight characters of the file
9 - 9 Character
Open indication (1 = open).
10 - 10 Character
End of document (1 = give up of record)
eleven - 15 Zoned dec *STATUS
Status code.
Sixteen - 21 Character *OPCODE
Operation code The first 5 posi
22 - 29 Character *ROUTINE
First 8 characters of the technique
30 - 37 Character
RPG IV source listing line range
Question 28. How To Determine If The Record Is In Used By Another User ?
Answer :
We can decide weather a file is in use bye some other user with the help of popularity code (*STATUS). If *STATUS = 01218 i.E. File already locked.
Question 29. What Is Procedure?
Answer :
A technique is the set of self contained excessive degree language statements that could perform a particular project and then returns to a caller.
Question 30. How To Define Global Parameter In Ile ?
Answer :
Declare a variable with key phrase EXPORT and while the use of this variable in another software declare with IMPORT keyword.
Question 31. What Is The Disadvantage Of Using Global Variable?
Answer :
We cannot hint out at which point the cost of variable is changed.
Question 32. What Is Service Program?
Answer :
A Service Program is a group of runnable procedures and to be had information gadgets easily handy by different ILE applications. In many respects it is just like a subroutine library and system library.
A carrier application differs from a application in approaches:
it does now not include a program access method. This way which you can't call a carrier program the usage of the CALL operation.
A provider software is sure into a application or other service applications using binding through reference.
Question 33. What Is Iso Date Format?
Answer :
YYYY-MM-DD for different formats seek advice from IBM guide or ERIS document.
Question 34. If We Tried To Move Year Part Of Iso Date Into A Field Of Length three, What Will Happen?
Answer :
Program crashes, as in case of ISO format it required fields of four,2,2.
Question 35. How To Avoid Using Indicators In Ile ?
Answer :
By the use of the usual Built In Expressions like %FOUND,%EOF, NOT %EOF, %BOF, NOT %BOF…and so on.
