IBM Interview Questions

IBM Interview Questions

1. What Is Rpg?

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

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

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. Which Program Rpg Or Cl Is Efficient To Update A Transaction Onto A Database File And Why?

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

4. What Is The Purpose Of Indicators In Rpg?

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. Describe The Function Of Setll Operation In Rpg Language?

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. What Is The Rpg System?

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. Is This An Rpg Channel?

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

8. What is A 'sim / Rpg'?


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 War craft (technically a MMORPG). However, Borderlands and other similar 'games' have nowhere near the level of structure or rules that true RPG's do.

9. What Is An Online Rpg?

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. How Can You Display Specific sub file Page on the Screen in Unequal Sub file?

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

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

11. What Are the Array Operations?

•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. Can You Debug Ile Rpg Program Using Isdb?

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. How Do You Use Commitment Control In Rpg?

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. How Do You Code File Field Renames In Ile Rpg?

•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. Do You Use Message Sub files? What Are the Necessary Keywords Required Coding a Message sub file?

•Specifying the SFLMSGRCD (24) keyword on the sub file record format identifies this sub file as a message sub file. The parameter value specified causes the sub file 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 sub file record format for a message sub file. The only specifications allowed for them are their names and the SFLMSGKEY and SFLPGMQ keywords.

•This sub file is built by a series of output operations to SFL that place messages in the sub file as sub file records. Messages are truncated to fit single lines (76 characters or 128 characters, depending on display size), and second-level help is available. This sub file 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 sub file. The SFLEND keyword allows the OS/400 program to display a plus sign whenever the sub file can be paged up.

16. What Is the Necessary Keyword Needed to Scroll sub file Records?

•Pg/Up & Pg/Dn.

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

17. Can More Than One sub file Record Be Displayed On One Line?

•Yes, using SFLLIN (sub file line).

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

•It results in equal sub file. 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 sub file 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. What Do You Mean By An Input Subfile, What Are The Keywords Required?

•The input data is first loaded to sub file 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 sub file records as changed. To enable READC on the same record, which was already read by READC, set on SFLNZTCHG and update sub file?

•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. Explain Sflclr, Sflend, Sfldlt, And Sflcsrrrn?

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


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

•SFLDLT - Deletes a sub file. Used when the program controls more than one sub file. Max. Active sub files (24)

•SFLCSRRRN - RRN of the sub file record where the cursor was positioned is returned.

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

•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. What Would Be The Effect On The Field Where Reverse Image, Underline, And High Intensity?

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

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

•Using CHANGE keyword e.g. CHANGE (25).

•BLANK for numeric field.

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

• SFL - Record level - specifies sub file record format, consists of variable data items.

• SFLCTL - Record level - specifies sub file 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 sub file. 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 sub file when program issues an output operation to the control record format.

25. What Is the Difference between Do While And Do Until?


•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. What Is File Information Data Structure?

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. What Is Program Status Data Structure?

A Program status DS can define 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. 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.

1. Reading input (READ)

2. Processing calculations (PROCESS)

3. Writing output (WRITE)

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


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

30. What Is The Use Of Sflnxtchg?

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

31. What Is Flat File?

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. What Is *inzsr Used For?

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. How Can You Execute A Command From Within An Rpg Program Without Calling A Clp Program?

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

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

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. How Do I Preserve And Clean The Array?

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. Can I Touch The Array During Treatments?

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. How Does The Rpg Element Work?

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

38. What Was The Robotech Rpg?

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. What Is Kids-rpg?

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. Why Isn't There Rpg Info On The Site?

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. How Do I Declare A Minor?

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

42. What Is A Rpg?

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. How Do I Play {insert Rpg System Here}?

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. Who Plays Spooky At Spooky's Rpg?

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 naires, graphics, and other related activities.

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

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. Are There Any Useful C Runtime Apis That I Can Call From Rpg Iv?

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. How Do I Do Concatenation In Rpg Iv, Like I Do In Cl?

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. Rpg Iv -- Release What?

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. How Do I Declare A Table Or Array In Rpg Iv?

To declare an array or table, use the RPG IV definition specification. The "D spec" allow 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. How Do I Declare A Pointer To An Array?

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 6.3), which is convenient; subscripting or incrementing the resultant pointer will access the individual members of the array.

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

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

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

Using SETLL opcode

53. What Are Data Types?

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

54. What Is Use Of Linkage Section?

Linkage section is used to accept data from outside the program. Either it's parm part of Jcl or Call from any other programs, they pass data into called program thru linkage section only.

55. How To Get The Last Record In Vsam File In Cluster? And How Can U Get The Ksds File Records Into Ur Cobol Program?

Move high values to the key of the VSAM file and the issue Read next record command. Then give Read previous command. This will read the last record. In VSAM, there is one command HURBA, Using that we can read the last record, If you want to know more about go to IBM RED BOOKS. You will get the solution. by using the HURBA we can get the max records by using the CKD count key data we will get the last record


56. What Is Difference B/w File-aid Tool And File-aid Utility?

File-aid tool is online tool (application) used for processing files using online screens. File-aid utility is used in jcl for processing files in batch.

57. Suppose Oza017.myorg.emp Has 100 Records, oza018.myorg.staff Has 200 Records But 50 Are The Common Records In Both Files Copy All The Common Records Into Dataset?


58. What Are The Parameter We Cannot Use In Procedure? How Many Instream We Can Write In Single Jcl? Can We Call in stream To Catalog and Catalog To in stream?

sysin dd * we cannot use in procedure,15 in stream proc we can code. We can call in stream to catalog. But we cannot call catalog to in stream

59. While Creating A Table, By Mistake You Have Given Size Of One Field As 10. But As Per Requirement Size Should Be 8. What Is Your Next Step?

If table is empty then we alter this column to any length, but if some data get inserted into the table then we can also decrease the column length up to largest data size available in that particular column.

60. Suppose I Have Two Tables A And B. Both Tables Are Connected With Ssn Number as Foreign Key. I Want To Retrieve A Column Data From B Table. How Will You Write A Query?

One can use Inner Join to get data from two tables

61. How Can We Increment Subscript And Index?





62. We Have An Output Dataset In Job With Disp Parameter As Shr. Can We Write Data In That File Dataset?



we cannot write when disp is share.

63. How To Handle -911 (deadlock) Error in a Db2 Program So That the Program Will Never Abend?

Dead lock timeout error occurs in the following case: If two or more programs acquired exclusive lock on the data, which may be needed for other programs without that data which cannot proceed further.

Solution: You can roll back current unit of work for one of the programs after preset time interval for deadlocks and terminate that program.

64. Suppose I Have 1000 Rows In A Db2 Table. I Want To Update First 100 Records, How Do I Do It?

Is there identity column in this table, for example, if there is a column indexnum int(supposed start from 1), you can use the Update Table Set XXX=XXX where indexnum < 101

65. How Would Find Total Records In Files Using Sequential?

We can increment the count for each reading of record in a file.

Read file

count = count + 1

At end

display count

66. What Is Label Record Is Standard Or Omitted In File Description Of Data Division?

Label record is standard means it will use disk files. But tape files can have standard label too. If the label record is omitted it should be the tape file without any begin and end blocks on the tape.

67. A Word in the Computer Memory Is Identified By_________


Word length

68. In an Evaluate Statement, Can I Give A Complex Condition On A When Clause?


69. What Is The Other Verb For Release And Write ?

Rewrite and Read

70. How Could You Write A Program In A Structured Format?

No go to's

71. Which Is More Efficient, Level 77 Or 01?


72. Execution Of A Subordinate Module Is Caused By The Use Of The Cobol Verbs ------------in The Superior Module


73. Which Of The Following Is True About The File Which Is Referenced In A Delete Statement?

Opened I/O mode

74. Can the Occurs Clause Be At The 01 Level?


75. How Many Sections Are There In Data Division?


76. How Is Sign Stored In A Comp Field?

In the most significant bit. Bit is ON if -ve, OFF if +ve

77. Indicate Which One Of The Following Is Not True About The Set Verb?

The verb can be used to increment one or more identifiers by a positive integral value.


78. Accept Ws-date From Date Will Return the Current Date?


79. Can You Rewrite A Record In An Esds File? Can You Delete A Record From It?

Can rewrite (record length must be same), but not delete.

80. How Do We Describe Static Call And Dynamic Call?

The difference between Static and Dynamic Call is that the first has the invoking program name hard coded into the call statement while the second has it in storage in an identifier. Also in the case of Static the invoking program is link edited with the invoked subroutine and in the case of Dynamic Call we will have a different module for each: the main program and the subroutine. IF we don’t use Initial or make a Cancel when we invoke the statically called subroutine then it will not be found in the default state; dynamically called routine will be forever in the default state.

81. How Do We Describe Cataloged Procedure And An in stream Procedure?

Cataloged procedures are invoked through a specification of the name of the procedure over the Exec statement and cataloged on the library of the procedure. For verifying a procedure prior to becoming a catalog procedure we will use an in-stream procedure. in stream procedures are similar to catalog procedures but there is a small difference at their execution: for executing them there are required to be placed between the Job statement and the Exec statement and they must be finished with a Pend statement.

82. How Are Start And Xctl Different?

Start is used for the beginning of new transactions and then the XCTL takes the operations further, transferring the control to a different application but with an equal transaction ID.

83. What Is The Meaning, The Advantages And Which Are The Types Of Evaluate Statement?

Evaluate statement is a different way for the neste IF statements and it works by choosing from a processing actions list. To replace IF we can use When to find out if an action will be taken. Like IF , When control goes from evaluate to the following statement on the application. The types of evaluate statement are trues and variable-name.

83. What Is the Meaning Of Not cat 2?

NOTCAT 2 is a MVS message that shows if two or more entries of the same catalog exist. If an entry is already there the catalog would send us an error message. The issue can be repaired by cataloging or deleting the primary data set and we must find that volume which contains the new data set and we must catalog it.

84. What Is The Role Of The Is Numeric Clause?

IS NUMERIC will be available for alphanumeric, packed decimal, unsigned numeric and signed numeric items? When an item is made of 0 to 9 the value returned by IS NUMERIC is True, if the item is signed then it can have 0 to 9 but also + and -.

85. What Sorting Order Does Search All Have?

The sorting order of SEARCH ALL will be Descending or Ascending, the initial value is ascending. When we want to switch to Descending we have to provide the Descending Key clause in the time we define the array which will be sorted; the table has to be loaded in the order stated.

86. What Is the Right Time for Using In-line Perform?

The right time is when the perform body is not used. If it is a type of code that has general means, being utilized in several locations in the program, the code should be met in a different Para and not use in-line perform, but perform paraname instead.

87. How Can We Repair A Soc-7 Error?

The main thing to do is repairing the problematic data, usually the cause for problems with SOC-7 is a numeric item that is un-initialized, this is the primary concern. Some of the setups give us dumps for run-time abends; this can also be made by invoking OS services or subroutines via the assembly language. The dumps are useful as the give us the ultimate instruction’s offset where the abend occurred. The output XREF listing of the compilation must be verified for obtaining the line number and the verb of this offset’s source code. After that the bug can be found in the source code. For capturing the runtime dumps, we should define datasets like for instance Sysabout in JCL. When these methods are not working we must find the error source with judgment and Display. If the setup has debugging utilities, we should make use of them.

88. How Can We Describe Comp Sync?

COMP SYNC aligns an item to the natural boundaries; it will be synchronized right and left. If we use binary items that are found at the boundaries of words in memory, these ones have a more rapid address resolution. The size of word from mainframe memory is four bytes. So every word has to begin from an address which is divisible by four. When the primary variable is x(3) and the next one is s9(4) comp if the Sync clause is not specified, the second variable will begin from byte 3. When Sync is specified the beginning address will be 4; this more rapid, even if we may notice a little waste of memory.

89. What Is The Meaning Of Ssrange And Nossrange?

These two are options of the compiler for verifying the out of range state for the subscript. The default will be NOSSRANGE and it implies no flagging of run-time errors when the subscript or index is exceeding the permitted range.

90. What Difference Exists Between Control Area And Control Interval?

A Control Area is a set of Control Intervals and it works during allocation. The size of the Control Area depends on the type of allocation (cyl, tracks, and records) and ots maximum reaches 1 cylinder. The Control Interval is something like a block for QSAM files; its size is ranged between 512 bytes and 32 kilobytes, normally 2 or 4 kilobytes. If the Control Interval is bigger the performance will also increase when it comes to sequential processing.

91. What Optimum Values Can We Find For Free space, Ci Etc?

The size of CI has to depend on the length of the record and the processing type. The normal value is 4 kilobytes but when the length of the record is bigger than 1 kilobyte we have to pick 6 kilobytes or 8 kilobytes. The normal values for FREESPACE are (20 20), when many insertions are made it should be bigger.

92. Can We Describe The Results Of Opening For Input Empty Vsam Files In A COBOL Program?

If the VSAM file didn’t have a record before it will be seen as unavailable and if we try to open it the operation will not succeed. Empty files can just be opened for output, case in which a dummy record will be written by COBOL and the file will be erased.

93. How Can We Define A Gdg?

GDG means Generation Data Group, for defining it we will write the command DEFINE GENERATION DATA GROUP. In the IDCAMS step, a different data set has to be defined and its DCB parameters will be used at the time when new generations are made. This is what we call a model dataset, whose ds name has to be similar to the one of the GDG.

94. What Is the Meaning of A (new, Catlg, Keep) Disposition Mean?

The meaning is that we have a fresh datasheet and it has to be allocated; the datasheet must be CTLG if all went right but to KEEP and not CTLG the datasheet when all is abended.

95. How Are The Objects Stored On As/400?

All objects are stored on AS/400 in a single level storage.

In this method all objects are referenced by one virtual address which is translated in to a physical address whether it is an auxiliary storage or main memory.

96. What Is A Spool File?

Printed output items placed in an output queue are known as spooled files.

97. In Which Specs Arrays, Tables & Constants Are Defined

In I Specs.

98. Which Are The Member Types Which Seu Supports?


99. What Are The Different Methods To Access Seu?

Use the Start Source Entry Utility command (STRSEU) Option 8 from STRPGMMNU through Program Development Manager (PDM)

100. What Are The Basic Features Of Seu?

Prompt depending upon type, shows right hand side date & left hand side the line number.

101. How Many Types Of Display Are Available On As/400 For User Interaction?

The 4 Types they are Entry, Menu, Information & List Display.

102. Which Are The Db2 Tools To Protect Integrity Of The Database?

Journaling & Commitment Control, Referential Integrity Embedded SQL & Object/Record Locks.

103. What Does The Opcode Free Do?

The FREE operation removes a program from the list of activated programs, frees static storage and ensures program initialization (first cycle processing) the next time program is called. It does not close file or unlock data area.

104. Why Rpg/400 Is Famous?

* Easy to code and analyze.

* Supports externally described files.

105. Define An Output Queue?

Output queues are queues of jobs waiting to be printed.

106. Difference between Ca & Cf?

CA: – It does not retain the value into the buffer memory.

CF: – It retains the value into the buffer memory.

107. What Is the Difference between Packed Decimal And Zoned Decimal?

Packed decimal: One digit occupies 1 byte.

Zoned decimal: One digit occupies 2 bytes.

108. Describe The Difference Between The Dowxx And Douxx Operations?

DOWxx : If the condition becomes true, then only the group of instructions allowed executing.

DOUxx : Irrespective of condition, it will execute at least one time.

109. Define the Purpose Of The *bcat Function?

To concatenate the two strings by placing a single blank in a resultant.

110. Define The Rcvf Command?

RCVF command used to receive the records either from the data base file or device file.

111. What Is Sflpag And Sflsiz?

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 the subfile.

112. Command Attention Key And Command Function Key?

With the help of Command attention key we can pass only the indicator status to program not the data from screen. While command function key passes indicator status as well as a data from screen to program.

113. What Is Overlay?

It allows a record format to be displayed on screen retaining the previous displayed record formats.

114. How to Get the Cursor Position?

With the help of RTNCSRLOC keyword, here we need to define a field to get row and column. Length of variable should be 5,0 fixed We can specify *FILED for filed *REC for Record on which a key is pressed.

115. What Are The Important Factors In Error Message Sub File?

We must define error message record format (SFLMSG). And a Program Queue. (PGMQ) and Record format is associated to a line number.

116. What Is *iso Date Format?

YYYY-MM-DD for other formats refers to IBM manual or ERIS document.

117. What Do We Can Do With The Embedded Sql Statements?

We can Insert/Update/Delete records, fetch records; fetch values from records into variables.

118. What Is The Use Of L Specs In Rpg?

Line counter specification can be used to describe printer file to indicate the length of the form and number of lines per page.

119. What Is The Use Of E Specification In Rpg?

Extension Specs describes all record address files, arrays and tables.

120. What Are Control Level Indicators?

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.

121. Specify Different Indicators Used In Rpg?

Overflow indicators

Record Identifying Indicators

Field Indicators

Resulting Indicators

Control Level Indicators

122. What Is The Use Of Header Specification In Rpg/400?

It identifies by H in column 6, provides information about generating and running programs.

123. What Is Difference Between Cat, Tcat, Bcat?

CAT – Concatenate two variables or constants into one continuous string.

BCAT – Truncates all trailing blanks in the first character string, one blank is inserted, and then the two character strings are concatenated.

TCAT – Truncates all trailing blanks in the first character string, the two character strings are concatenated.

124. What Is The Select And Omit Criteria In Logical File?

This is used to specify rules for the Selection/Omission of records from a Physical File.

125. Describe About Query/400?

Query/400 is a licensed program that uses a query to analyze and select the information contained in the data base files and create a query report.

A query report can be:

* displayed on a workstation (screen)

* printed

* stored in another database file.

126. What Is The Purpose Of Level Check Parameter In A Physical File?

Specifies whether the level identifiers of the record formats in the physical file are checked when the file is opened by the program.

127. Explain Icm Instruction?

ICM means Inserts character under mask. it’s a movement of character under mask bits.


ICM R8,B'0110',SRC

Before execution:

R8 ==> 12 34 56 78

SRC ==> AB CD EF 10

After Excecution:

R8 ==> 12 CD EF 78

128. Can We Use An Equated Value As Operand For An Mvc Instruction? Reason For The Same?

If you write an MVC statement with an equated value as the sending operand, then the assembler will try to resolve that operand value as a base and displacement, it will not necessarily throw an error at assembly, but the results at execution will be unpredictable and may well give rise to a protection exception.

The point of the MVI statement is that the single byte sending operand value is assembled as part of the instruction itself and does not have to be 'fetched' at execution time, therefore if you are only moving a single byte of fixed value, then an MVI will be marginally more efficient than an MVC

129. How to Retrieve The Instream Data In Sysin?

Use Accept in procedure division.

Example :


01 empno. Pic x(05).

01 empname pic x(15).

01 empsal pic 9(10).









In JCL :



//sysin dd *





130. How to Pass The Parameters From Jcl To Assembler Pgm?

R1 contains a full word that contains a address pointing to the parm data. In pgm before accessing the parm data use L  Rn,0(,R1) where n=3,..11 , Rn contains the address that points to parm data. Create DSECT that contains a half word and the length of the data.

131. What Will Happen If We Drop The Base Register In The Pgm Which Contains Only One Base Reg?

It will give an error at the time of assembly, if there are some labels defined in the program (provided they are being referenced in your program). This is because the assembler resolves the displacement of that variable from the location where your base register is pointing to.

132. Why Do We Have Multiple Base Registers In Certain Programs?

It all depends upon the length of your program, if it is more than 4095 then we need 2 register else only one can do needful. Basically we can even use save area register as a base register, so as to accommodate the length of the program

133. What Is the Difference in Data Type "x" And "p"?

In MVS assembler data type X denotes hexadecimal data type which unsigned pack. Suppose you define VAR1 as "VAR1 DC X'01'".

It will occupy 1 byte in the memory and stored as:

0 in the zoned nibble and 1 in the numeric nibble.

P denotes the packed data type, similar to COMP-3 in COBOL.

If you declare any variable with this data type then it  must have a sign byte at last nibble.

See following example:

VAR2 DC P'1'

it will occupy one byte in the memory and stored as '1C'.

134. Why Do We Use "drop"? What does "using" Do?

Neither DROP nor USING affects the register contents. Once a register has been loaded with the address of a piece of storage, the using statement can be used to 'map' that storage against a set of labels defining the layout of that storage e.g. a DSECT. Then whenever one of those labels is referenced in the code, in moves etc, the assembler resolves the relative address as a particular displacement from the absolute address in the register. The DROP instruction removes the relationship between the labels and the register and renders subsequent references to those labels as unresolvable, giving rise to errors at assembly (compile) time.

Typically the DROP instruction will be used to allow use of the register for another purpose, e.g. address a different bit of storage via a using statement on second DSECT without the risk of corrupting that data via moves referencing the original DSECT.

135. How to Initialize A Register To 0000?

XR Rx,Rx:

This is the best way and most efficient way of initializing

The register values or Label values to '0'.

It’s because the time required executing a Logical

Instruction is always less than the Arithmetic Instructions.

e.g SR Rx,Rx consumes more execution time than XR Rx,Rx.

So XR Rx,Rx is a better way to do obtain our target.

136. What Is House Keeping In Assembler? And Explain The Following Code <br>hellotso Start 0 <br>* Print Nogen <br>begin Save (14,12) <br>lr 12,15 <br>using Type,12 <br>st 13,save+4 <br>la 11,save <br>st 11,8(13) <br>lr 13,11

Housekeeping is used to store the contents of the base register from one register to another for using that register. These are housekeeping instructions where contents of the registers are stored

content of the register 15 is stored in the register 12

address in reg 12 is mapped to the module type

save area is stored in the register 13



137. What Is Base Register?

A base register is any general purpose register chosen by programmer. It is assigned at the beginning of the program as part of housekeeping with the USING assembler keyword, and it's purpose is to maintain addressability within a page (4k) of code or data.

138. Why Can Only 256 Bytes Be Moved From One Address To Another In A Mvc?

Length feild is 8 bits so the data is stored in binary format so if we have all 8 bits set to 1 then the length will be 128+64+32+16+8+4+2+1 = 255.or 2^7+ 2^6+2^5...2^0 = 255.

so the length is 256 .

139. How Are Data Passed From Jcl Parm To Assembler Program. And How Is Data Passed From A Calling Program To An Assembler Called Program?

By convention, general purpose register 1 will have the address of the parameter list. The list will be a list of pointers (addresses) to individual parameters. The CALL macro does this, but you can bypass the CALL macro and be creative on how you set up the parameter list. Don't forget the parameter must be on a full word boundary.

140. What Is The Use Of Trt Instruction And How It Is Working?

For example we want to test if given variable is numeric we can do it by following code.

We can define a table with all FF except from 0 to 9 00

Table1 DC 256c'ff'

org table1

dc 10c'00'

Now we can give TRT var1, table1

BZ numeric

141. What Is Need Of Start 0? In Steed Of

START is an assembler directive which has an optional operand, (0 in your example). This operand acts as the starting address of the program e.g. PROGNAME START X'3E0' tells the linkage editor that this program is to be loaded into main storage at address '3E0' in hex.

142. How Do You Round The Addition Or Subtraction Of Two Numbers In Assembler? What Does The Following Code Do? Ap Wkur,=p5 Where Wkur Is A Label?

This is a vague two-part.

You can round by adding .5

Adds 5 to WKUR, but it had better be a valid packed field, and not just a label.

143. How Many Maximum Base Registers We Can Have In A Program And Also How Many Maximum Base Registers We Can Have In A Single Program?

There are 16 registers, and ALL can be used as a base EXCEPT for register 0, so the answer is AT LEAST 15. AT LEAST is specified here because in any section of code, you can "re-use" a previous base register once you are no longer within the original address range ("scope") of that particular base register. By re-using the registers, you can have base registers that will cover ALL of the memory in the machine - but not all at once - you have to "bite off" 15 base reg-at-a-time chunks of memory (all addressable memory does not have to be contiguous - it can be scattered around memory in 4K pieces).

144. How to Pass In stream Data In Sysin With Assembler?

You will need to open de file SYSIN via a DCB and read the data via GET commands. The data in the PARM field is passed via register 1. Any dataset you want to use in Assembler you will need to open. There is no automatic allocation.

145. Can We Use Mvc Instruction To Move Pack Field To Pack Field. Which Instruction You Will Use And Why?

We can certainly use the MVC instruction to move the pack data to another pack field.

146. How to Initialize 20,000 Bytes In The Assembler?

since the machine-code for MVC moves up to 256 bytes, you would need to do a series of MVCs to initialize 20000 bytes. this requires that you maintain a register or two to keep track of how far you've progressed through initialization.

Possibly, you could get MVCL to do it; i've never tried...

MVCL uses 2 sets of even-odd pairs of registers to do the move.

You specify source address, destination address, length of source, length of destination, and fill character in the registers. the fill-character goes into the high order byte of (I THINK...) the destination length register (in this case r4)

l r4,=f'20000'

l r6,=f'20000'

la r7,source_field

la r5,dest_field

mvcl r4,r6

147. Write The Fetch Cycle And Execute Cycle For Following Instructions:jmpnz (jump To The Given Address If The Accumulator Not Equal To Zero) Ret(return From A Subroutine) Adb (add The Contents Of Register B To The Accumulator And Save Result In The Accumulator)?

As this is mainframe assembler section, this is a trick - there is no JMPNZ opcode for mainframe (recently added JNZ with relative addressing in the z/800 and later, but no JMPNZ) and the mainframe has no RET instruction (there is a PR to return from a cross address space or PC "call" statement) and the mainframe has no accumulator, ADB opcode, or B register.

148. What Is The Difference Between Various Read And Find Statement, and Which One Should Be Used When For Better Adabas Performance?

There are two possible scenarios:

This is a classroom question where you are expected to do some research on your own, and not ask someone in the cloud for the exact answer.

The is too vague, and would require a full essay to answer. Please be more specific.

149. Registers (0-15) ,where They Are Going Be Resides Does That Mean Here Is It Resides Whether Real Or Virtual Memory? And Why? Then Why We Are Assign Even Registers (0 To 6) For Fp Operations?

Registers are part of the CPU logic and should not be confused with memory real or virtual. The is about as sensical as asking where the uterus resides in a man. Also, general purpose registers 0--16 are an entirely different breed that the floating point registers. As for the numbering, a decision made by the manufacturer's design people.

150. How to Produce Soc7 Abend?

S0C7 occurs when the data exception occurs.They are many ways to produce S0C7

Move non numeric data to a numeric feild

Compare junk data with a numeric feild

Use a non numeric data in COMPUTE statement

Refer to the occurence in a table beyond the occurs time with SSRANGE not checked in complier options

151. How to Access Vsam File?

VSAM file can be accessed through an Assembler application program by using assembler macros RPL, ACB

152. Change Process Tool (code Changes from Dev to Prd) The Changes Made To Your Code Should Be Effected In Live. How The Process Takes Place. That Is How Can You Move The Code Changes From Development To Production?

If there are any updates in the Macros regarding the structure change or addition/removal of byte, then you need to promote the macro to Live first.

Reassemble your codes against the Live Macros.

Raise ELAS for the Codes to go to production.

Promote the codes to production.

153. Explain About Maximum Displacement And How To Cross This Limit?


Assuming displacement is referring to x(d,b) addressing and not something like displacement from the start of a CSECT.