IBM - RPG Interview Questions & Answers

IBM - RPG Interview Questions

Do you like to switch your career? Here's our recommendation on the important things to need to prepare for the job interview to achieve your career goals in an easy way. IBM RPG is one of the programming language. Started in 1959 as Report Program Generator that copies punched cards on the IBM 1401, later evolved to PL/I and COBOL. Like every other programming language, it has its keywords, variables, Data types and more. The current version, RPG IV (a.k.a. ILE RPG), provides a modern programming environment. One can check the availability of the job across cities including Mumbai, Delhi, Bangalore, Pune and Hyderabad. Follow Wisdomjobs page for IBM - RPG job interview questions and answers page to get through your job interview successfully.

IBM - RPG Interview Questions And Answers

IBM - RPG Interview Questions
    1. Question 1. What Is Rpg?

      Answer :

      RPG is a high-level programming language (HLL) for business applications, initials which stand for Report Program Generator.

    2. Question 2. What Is Data Area And How It Is Used In Rpg Program ?

      Answer :

      Data area is a type of an object which is used for storing data. It is defined using opcode *NAMVAR. The data is read by \"IN\" and written by \"OUT\" opcode.

    3. Question 3. Which Program Rpg Or Cl Is Efficent To Update A Transaction Onto A Database File And Why ?

      Answer :

      CL program cannot update/write onto a data base file and hence, choice is RPG program.

    4. Question 4. What Is The Purpose Of Indicators In Rpg?

      Answer :

      It is generally used to indicate the result of an operation or to condition (or control) the processing of an operation. Indicators are defined either by an entry on the specification or by the RPG IV program itself. The positions on the specification in which you define an indicator determine how the indicator is used. An indicator that has been defined can then be used to condition calculation and output operations. An indicator can be control level indicator, resulting, record identifying etc.

    5. Question 5. Describe The Function Of Setll Operation In Rpg Language?

      Answer :

      The SETLL operation positions a file at the next record with a key or relative record number that is greater than or equal to key or relative record number specified in factor1.

    6. Question 6. What Is The Rpg System?

      Answer :

      The RPG System is one of the interactive features of this site, it is a graphical representation of the user's activities and contribution to the site and forums. It is only for show/looks and has no effect of anything what-so-ever.

    7. Question 7. Is This A Rpg Channel?

      Answer :

      No. This is a channel for conversation. No one actively roleplays in #Vampire, although many do frequent channels that DO roleplay, the most prominent one being #VampireHall. Check them out.

    8. Question 8. What Is A 'sim / Rpg'?

      Answer :

      A Sim is a simulation. In this case, sort of a writers' collective where a diverse group of people all collaborate on stories set in a common idiom. It is also referred to as a Role-Playing Game (RPG), because of the similarity to games like Dungeons and Dragons, or even Worlds of Warcraft (technically a MMORPG). However, Borderlands and other similar 'games' have nowhere near the level of structure or rules that true RPG's do.

    9. Question 9. What Is An Online Rpg?

      Answer :

      online RPG connects to a network server. Like former similar RPGs, your character will grow and advance in the world. Players from around the world are united, allowing them to form parties and experience thrill and adventure together.

    10. Question 10. How Can You Display Specific Subfile Page On The Screen In Unequal Subfile?

      Answer :

      • If CURSOR is specified for the SFLRCDNBR the cursor is placed in the subfile record whose relative record number is identified by the contents of this field.

      • SFLRCDNBR (Subfile Record Number) - Displays the page of the subfile containing the record whose relative record number is in this field.

    11. Question 11. What Are The Array Operations?

      Answer :

      • The LOKUP operation causes a search to be made for a particular element in an array or table.
      • The MOVEA operation transfers character or numeric values from factor 2 to the result field. (Certain restrictions apply when moving numeric values.) Factor 2 or the result field must contain an array. Factor 2 and the result field cannot specify the same array even if the array is indexed.
      • SORTA (Sort an Array)
      • XFOOT (Summing the Elements of an Array)

    12. Question 12. Can You Debug Ile Rpg Program Using Isdb?

      Answer :

      No. However we can debug RPG program using STRDBG.
      Compile RPG using with Source listing options . . . *SRCDBG.
      OPM stands for original program model
      Same process for CLP also.

    13. Question 13. How Do You Use Commitment Control In Rpg?

      Answer :

      With commitment control, you ensure one of two outcomes for the file operations:

      either all of the file operations are successful or none of the file operations has any effect. In this way, you process a group of operations as a unit. To use commitment control, you do the following:

      • Use the CL commands CRTJRN (Create Journal), CRTJRNRCV (Create Journal Receiver) and STRJRNPF (Journal Physical File) to prepare for using commitment control, and the CL commands STRCMTCTL (Start Commitment Control) and ENDCMTCTL (End Commitment Control) to notify the system when you want to start and end commitment control.

      • Specify commitment control on the file-description specifications of the files you want under commitment control.

      • Use the COMIT (Commit) operation code to apply a group of changes to files under commitment control, or use the ROLBK (Roll Back) operation code to eliminate the pending group of changes to files under commitment control.

    14. Question 14. How Do You Code File Field Renames In Ile Rpg?

      Answer :

      •The PREFIX keyword is used to partially rename the fields in an externally described file. The characters specified as prefix string are prefixed to the names of all fields defined in all records of the file specified.
      •You can also explicitly rename a field on input specification on field description entries.

    15. Question 15. Do You Use Message Subfiles? What Are The Necessary Keywords Required Coding A Message Subfile?

      Answer :

      • Specifying the SFLMSGRCD (24) keyword on the subfile record format identifies this subfile as a message subfile. The parameter value specified causes the subfile to appear on line 24 of the display.

      • The fields MSGKEY and PGMQ are user-defined names given to the two fields required for the subfile record format for a message subfile. The only specifications allowed for them are their names and the SFLMSGKEY and SFLPGMQ keywords.

      • This subfile is built by a series of output operations to SFL that place messages in the subfile as subfile records. Messages are truncated to fit single lines (76 characters or 128 characters, depending on display size), and second-level help is available. This subfile is displayed by an output operation to SFLCTL.

      • The OS/400 program when the display station user presses a Page Up or a Page Down key pages this subfile. The SFLEND keyword allows the OS/400 program to display a plus sign whenever the subfile can be paged up.

    16. Question 16. What Is The Necessary Keyword Needed To Scroll Subfile Records?

      Answer :

      •Pg/Up & Pg/Dn.

      •SFLSCROLL (Subfile Scroll) - Returns the relative record number of the subfile record that is at the top of the subfile when control is given to the application.

    17. Question 17. Can More Than One Subfile Record Be Displayed On One Line?

      Answer :

      •Yes, using SFLLIN (Subfile line).

    18. Question 18. What Happens When Sflsiz = Sflpag? What Are The Advantages And Disadvantages?

      Answer :

      •It results in equal subfile. Loads only one page of records at a time. Can handle any number of records. But programming becomes much more involved.

      •The other case is that of Expanded subfile where in only Pg/Dn has to be programmed. It is displayed in a stable amount of time, depending on how many records the program loads.

    19. Question 19. What Do You Mean By An Input Subfile, What Are The Keywords Required?

      Answer :

      •The input data is first loaded to subfile and after doing interactive data validation they are added to physical file. The new keywords required include SFLNXTCHG, SFLINZ, and SFLRNA.

      •SFLNXTCHG - It enables a READC instruction to process all of the subfile records as changed. To enable READC on the same record, which was already read by READC, set on SFLNZTCHG and update subfile.

      •SFLINZ - Initializes alphanumeric fields to blanks and numeric fields to zeros. When input records are added to a subfile initialized by an SFLINZ operation, they are flagged as changed.

      •SFLRNA - Initializes the subfile with no active records.

    20. Question 20. Explain Sflclr, Sflend, Sfldlt, And Sflcsrrrn?

      Answer :

      •SFLCLR - Clears subfile area before the subfile is created.

      •SFLEND - Displays + sign to the right of the last subfile record on the current page, indicating that more records are available.

      •SFLDLT - Deletes a subfile. Used when the program controls more than one subfile. Max. Active subfiles (24)

      •SFLCSRRRN - RRN of the subfile record where the cursor was positioned, is returned.

    21. Question 21. What Is The Difference Between Non-display Attribute & Hidden Fields?

      Answer :

      •Non-display - Causes the data in the field to be invisible to the operator. The display positions for the fields appear to be blank. Use this attribute for passwords or other security-sensitive data. Non-display fields do not print.

      •Hidden - Type H to indicate a hidden field (one that is used for both input and output but not displayed).

    22. Question 22. What Would Be The Effect On The Field Where Reverse Image, Underline, And High Intensity?

      Answer :

      •The field will not be displayed i.e. becomes non-display.

    23. Question 23. How Can A Screen Field That Has Changed Since The Last Output Operation Be Detected?

      Answer :

      •Using CHANGE keyword e.g. CHANGE (25).
      •BLANK for numeric field.

    24. Question 24. What Are The Key Words You Must Use When Using A Subfile?

      Answer :

      • SFL - Record level - specifies subfile record format, consists of variable data items.
      • SFLCTL - Record level - specifies subfile control record format in which display, clearing, and initialization functions are controlled.
      • SFLSIZ - Record level control record keyword - specifies the number of records that may be loaded in the subfile. Max. (9999)
      • SFLPAG - Record level control record keyword - specifies the number of records that may be displayed on CRT at the same time.
      • SFLDSP - Record level control record keyword - displays the subfile when program issues an output operation to the control record format.

    25. Question 25. What Is The Difference Between Do While And Do Until?

      Answer :

      •The DOU operations allow the processing of a group of calculations one or more times. The end of a Do-Until operation is indicated by an ENDDO operation. Here processing is done at least one time.
      •The DOW operations allow the processing of a group of calculations zero or more times. The end of a Do-While operation is indicated by an ENDDO operation.

    26. Question 26. What Is File Information Data Structure?

      Answer :

      File Information Data structure (INFDS) can be defined for each file to make file exception/error information available to the program. A file information data structure contains predefined subfields that identify: the name of the file for which the exception/error occurred. the record being processed when the exception/error occurred or the record that caused the exception/error. The last operation being processed when the exception/error occurred.

      The status code. The RPG routine in which the exception/error occurred.

    27. Question 27. What Is Program Status Data Structure?

      Answer :

      A Program status DS can defined to make program exception/error information available to an RPG program.

      DS is defined as program status DS by an S in position 18 of the DS statement.
      *STATUS contains status code.
      *ROUTINE : contains name of routine in which the exception/error occurred
      *PARMS : contains the number parameters passed to this program from the calling program.

    28. Question 28. During Execution, An Rpg/400 Program Automatically Follows A Sequence Of Operations For Each Record That Is Processed. The Built-in Program Cycle Includes The Following Logical Steps.

      Answer :

      1. reading input (READ)
      2. processing calculations (PROCESS)
      3. writing output (WRITE)

    29. Question 29. What Is The Difference Between The Cpyf Command Crtdupobj Command?

      Answer :

      CRTDUPOBJ command is only to duplicate objects and does create duplicate files whereas the CPYF is to have exact copies of the file.

    30. Question 30. What Is The Use Of Sflnxtchg?

      Answer :

      when a changed record is read MDT is set on automatically by the system. when user wants to read it again it wont the changed record so we need o set on MDT for that we are using SFLNXTCHG.

    31. Question 31. What Is Flat File?

      Answer :

      When a file is declared in program as a flat file no need to use READ commands the program will read the flat file from starting to EOF. only one flat file can be declared in a program.

    32. Question 32. What Is *inzsr Used For?

      Answer :

      It is special type of RPG/400 subroutine, which is executed automatically at beginning of the program. It is a good place to code initializes the variables.

    33. Question 33. How Can You Execute A Command From Within An Rpg Program Without Calling A Clp Program?

      Answer :

      By calling QCMDEXC application program interface we can execute a CL command with in an RPG program.

    34. Question 34. How Can I Tell When To Replace The Array?

      Answer :

      When the array no longer bubbles the electromagnetic properties are depleted and the array should be replaced. Check the bottom of the array for any excessive corrosion at the connecting points and to make sure there is a solid joint.

    35. Question 35. How Do I Preserve And Clean The Array?

      Answer :

      Dip the array in a solution mixture of 1 part white vinegar to 2 parts warm water for a couple of minutes. Then brush the array to remove excess particles and rinse thoroughly with warm water and pat dry.

    36. Question 36. Can I Touch The Array During Treatments?

      Answer :

      Absolutely, this will not alter the treatment in any way. However, remaining relatively still will enhance the viewing of the toxins being emitted from the body as they float to the top of the water bath.

    37. Question 37. How Does The Rpg Element Work?

      Answer :

      Each character is attributed skill levels, an endurance factor and Leadership qualities. Attributes can be improved by successfully completing missions, and gaining medals.

    38. Question 38. What Was The Robotech Rpg?

      Answer :

      The Robotech RPG was a role-playing game based on the Harmony Gold animated television series, Robotech. Game supplements cover the Macross, Southern Cross, and Invid Invasion portions of the animated series, as well as the Sentinels. Characters can be human, Zentraedi, or a Sentinel race. Character classes include the Veritech and Destroid pilot. Campaign settings include Macross, Southern Cross, Invid Invasion, and the Sentinels.

    39. Question 39. What Is Kids-rpg?

      Answer :

      kids-rpg is a mailing list run through the Yahoo!Groups web site. Its purpose is to foster discussion on the topic of kids and non-computer-based role-playing games.

    40. Question 40. Why Isn't There Rpg Info On The Site?

      Answer :

      Because it's a site about the show's canon, not about RPGs for the show. If you're running an RPG and are using this site as a reference, cool. But I'm not a gamer, and I don't tend to track some things that are important to gaming. Sorry! I also don't include information from RPGs, official or otherwise -- they have their own reference works, and don't apply outside their own specific game universe.

    41. Question 41. How Do I Declare A Minor?

      Answer :

      The application for the minor you choose is available at the department that supervises that minor, not at the HPA Department.

    42. Question 42. What Is A Rpg?

      Answer :

      A RPG is a roleplaying game. These are games which allow a person to act out various different fantasy situations and characters, usually with a troupe of other players. Some RPG's are played around a table with ten or more sided dice, others are acted out as in a play (Live action roleplaying). Some are played with cards, and still others are played with a mixture of all of the above. There are several different companies which design RPG's.

    43. Question 43. How Do I Play {insert Rpg System Here}?

      Answer :

      You sit down with a person who knows how to play already. Click here to find players in your area. At least, that's the easiest way. If you're all new, there are several web sites dedicated to teaching you how to play any RPG. Click here for some general advice.

    44. Question 44. Who Plays Spooky At Spooky's Rpg?

      Answer :

      Fox Mulder is a reserved character that all veteran players can write at anytime. No one may adopt Fox Mulder as a PC. Most role playing games have a GM (Game Moderator) to keep everything running smoothly. The GM acts as a referee, keeping the game alive, breaking up fights, stuff like that. The Vice-Moderator, who takes over when the GM needs a vacation to real life, also helps with questionnaires, graphics, and other related activities.

    45. Question 45. What's New In Os/400 Version 5 Rpg Iv?

      Answer :

      So much is new in RPG IV with OS/400 Version 5, that I wrote an article about it. Read my article about the enhancements to RPG IV in OS/400 Version 5. The %CHAR built-in function has be fixed. It now functions like it was supposed to in the first place. You can wrap a numeric value in %CHAR and a nicely edited character form of the number is returned. The edited form includes the decimal, trimmed off leading blanks, and a negative sign.

    46. Question 46. Are There Any Useful C Runtime Apis That I Can Call From Rpg Iv?

      Answer :

      There are several C runtime APIs available to the RPG IV developer. In OS/400 version 3, release 1 the scope of these APIs is limited. The CALLB operation code can be used to directly call the C runtime APIs, provided they don't require "pass by value" parameters. In V3 R2 and later, parameters can be passed by reference or by value. In addition, Prototypes are supporte for calling procedures written in RPG IV or other languages.

    47. Question 47. How Do I Do Concatenation In Rpg Iv, Like I Do In Cl?

      Answer :

      In the initial release of RPG IV, the plus sign can be used to do simple concatenation. When the expression of any of the enhanced operation codes includes string expressions, then the plus sign is considered a concatenation operator. In later release of RPG IV, the built-in function %EDITC can be used to allow numeric fields to participate in simple concatenation. The example below illustrates the basic concatenation (line 4) and the enhancement introduced in OS/400 V3 R7. ....

    48. Question 48. Rpg Iv -- Release What?

      Answer :

      RPG IV was first shipped with OS/400 Version 3, Release 1. This is now referred to as RPG IV release 1. But don't worry about remembering releases of RPG IV. Under OS/400 Version 3, Release 6, IBM enhanced RPG with procedures, many more built-in functions, and several new data types. This is referred to as RPG IV release 2. Then, OS/400 Version 3, Release 2 was announced. It brought the original release of RPG IV (on the CISC boxes) up to the same level as RPG IV under V3R6.

    49. Question 49. How Do I Declare A Table Or Array In Rpg Iv?

      Answer :

      To declare an array or table, use the RPG IV definition specification. The "D spec" allows you to code the array or table on a single line. The keyword to use is DIM (dimension). This is where you specify the number of elements in the table or array. For example, to create an array named ITEMS with 200 elements, each 10 characters in length, the following Definition spec can be used:

    50. Question 50. How Do I Declare A Pointer To An Array?

      Answer :

      Usually, you don't want to. When people speak casually of a pointer to an array, they usually mean a pointer to its first element. Instead of a pointer to an array, consider using a pointer to one of the array's elements. Arrays of type T decay into pointers to type T (see question 6.3), which is convenient; subscripting or incrementing the resultant pointer will access the individual members of the array.

    51. Question 51. A Rpg Or Clp Command To Find If The File Field Is Defined As A Character Or Numeric Field.

      Answer :

      In RPG we can test for the field is numeric or not . The OPCODE is TESTN.

    52. Question 52. Check Existence Of One Record Without Using Chain Or Read?

      Answer :

      Using SETLL opcode

    53. Question 53. What Are Data Types?

      Answer :

      They are attributes of columns, literals, and host variables. The data types are SMALLINT, INTEGER, FLOAT, DECIMAL, CHAR, VARCHAR, DATE and TIME.

Popular Interview Questions

All Interview Questions

Ibm - Rpg Practice Test

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

IBM - RPG Tutorial