IBM Natural Interview Questions & Answers
Download PDF

IBM Natural frequently Asked Questions by expert members with experience in IBM Natural. So get preparation for the IBM Natural job interview

27 IBM Natural Questions and Answers:

IBM Natural Interview Questions Table of Contents:

IBM Natural Job Interview Questions and Answers
IBM Natural Job Interview Questions and Answers

1 :: Explain Is it possible to code GOTO statement in NATURAL? if yes please provide the syntax of the same?

No, There is not GOTO statement in Natural.
There is a Perform statement which is used to call a
A subroutine is a a block of code which is to be executed
several times within an object.

2 :: Tell me what type of files we can process thru file-aid?

Flat - sequential or VSAM files

3 :: Explain why do we use file-aid for seqential files?

We use File aid for sequential files for the following

1. Copy from one file to another only selected amount of
2. To browse or edit through the file using a copybook.
3. For impact analysis on a particular file.

4 :: Explain how to ftp the natural program to desktop? (from mainframe to pc), is it possible?

Yes, it is possible. The below JCL can list the source of
the Natural program to a dataset and it can be very well
downloaded using option 6.


5 :: How do you pass data from a Natural Program to an External Subroutine? Can it share the LDA of Program as in Internal Subroutine?

Parameters can be passed with the PERFORM statement from
the invoking object to the
external subroutine. These parameters must be defined
statement of the subroutine, or in a parameter data area
used by the subroutine.
An external subroutine can access the global data area used
by the invoking object.
In addition, an external subroutine can have its own local
data area, in which the fields that are to be used
only within the subroutine are defined.
However, an external subroutine cannot have its own global
data area.

6 :: What happens when you issue a ESCAPE ROUTINE in a program?
Will there be any compilation /Run time erro?

Escape Routine is generally used to interupt the processing
of Subprogram or Subroutine to return Control back to the
next statement from where this subprogram or routine was

This statement will return an error if not placed within a
subprogram, subroutine or processing loop.

7 :: Suppose You are processing an input file in a Natural program and you want the program to fail if the file is empty. What command you use in Natural to force it to fail?

You use the following steps to check whether the input file
is empty

Step A. Read work file #WK-Number once #WK-Record
Step B. At End of File
Write "Input file is Empty"

The first step will read the first record in the file and
the next step will see the End of File condition. If the
File is empty, the program will write that we have an Empty
input file to spool.

8 :: Explain the difference between External subroutine and

An External Subroutine has got access to the Caller's GDA
where in the subprogram does not have.

The subprogram is like blackboxes as they are not aware of
the caller's environemnt. They take only the parameters and
process it and return the values. e.g. One natural
subprogram can be called through middle tiers like Entirex
and Vitria from a different environment(Lets say a dot net
or java developed web interface).However a similar
interface can not call a natural external subroutine.

As far as calling is concerned you use callnat for
subprogram and perform for external subroutine.

10 :: What is COBOL coding sheet?

1-6 sequence numbers.

7 (*) for comment (-) for continue (D) for debugging.

8-11 called as Area-A in this Area we can write
Divisions,Paragraphs,sections,Level numbers.

12-72 called as Area-B in this area we can write cobol
executable statements like select,accept,display.

73-80 is ignored area by compiler but we can see in source

11 :: Can we see the copy book length using file-aid?

yes we can find out the copy book length by using fileaid

12 :: How are you going to remove duplicates from the file that is being read?

steps are as below
1. file should be in sorted order
2. you can use either at break statement on the descriptor
and then do the validation or you can used desctiptor field
for comparison of secod record and first record, if the
descriptor values are same then escape top

13 :: Can you explain control variable in online screens?

A control variable is used to dynamically set attribute and
colour definitions for a field or group of fields depending
upon a program condition. For example, Consider an order
processing screen that allows you to create new contracts,
modify existing contracts and look-up paid-up contracts.
The screen used for all these functions is the same.
However, when a paid-up contract is shown to the user, you
do not expect it to be displayed in a modifiable state. So,
you protect all the fields of the map and show it
like "read only". However, for modifying an existing, non-
paid-up map, you enable certain fields. So, control
variables can be used in scenarios like this to dynamically
set the attributes of the field.

14 :: Explain ADABAS basic concepts. Like inverted list, address converter ,data storage?

ADABASE the adaptable database, is a high-performance,
multithreaded, database management system for mainframe
platforms where database performance is a critical factor.
It is built on INVERTED LIST model.

Inverted List: it is used to resolve Adabas search commands
and read records in logical sequence, is built and
maintained for each field in an Adabas file that is
designated as a key field or “descriptor”.t is called
an “inverted” list because it is organized by descriptor
value rather than by ISN.

ADDRESS CONVERTOR:it contains the RABN's in ISN order. It
determines the physical location of a record. It is an
index that maps the logical identifier of a record (that
is, the ISN) to the relative Adabas block number (RABN) of
the Data Storage block where the record is stored.

DATA Storage:It stores the actual record in the order in
which it was entered

15 :: What is a hyperdescriptor? How does it work?

Its a special kind of discriptor,It is an extension of
Super descriptor and can have maximum of 20 fields.The
hyperdescriptor option can be used to generate descriptor
values based on a user-supplied algorithm.With
hyperdescriptors, “fuzzy” matching is possible; i.e.,
retrieving data based on similar rather than on exact
search criteria. Hyperdescriptors allow multiple virtual
indexes, meaning that several different search index
entries can be made for a single data field.

16 :: What is the quality process in development?

When developing a new program, make sure that you remove unwanted fields or views that are declared inside the DEFINE DATA section. Since when a program is compiled, it picks these fields also in the buffer memory during compilation and resources would be wasted and efficiency is affected.

Do not use unwanted READs inside a FIND statement.

Never use an UPDATE inside a physical READ.

Avoid using COMPUTE statements while performing straight forward addition, subtraction functions, rather use the appropriate ADD, SUB statements for it.

17 :: How to create 1 DDM that fetches 3 ADABAS files simultaneously?

In general the DDM is part of a single Adabas file and we
the programmers play around the views of DDMs.

It is possible that there can be multiple views of a same
file, but I never heard that there can be one DDM from
multiple files.

18 :: A field declared as P8 needs to be redefined as
Alphanumeric. What would be its new size?

I think directly this conversion is not possible as packed
decimal is used for numeric value fields only.
Since it is p(8) so the numeric value field size should be
15 or 16 as [8 can be either (n+1)/2 i.e. (15+1)/2 or ( n/2)
i.e. 16/2].
So we can say (n15 or 16) will be (P8).
Alternatively (A16 or 15)

19 :: Is it possible to declare a GDA for an external subroutine?

An external subroutine can access the global data area used
by the invoking object(Program, Subprogram)
Moreover, parameters can be passed with the PERFORM
statement from the invoking object to the external
subroutine. These parameters must be defined either in the
DEFINE DATA PARAMETER statement of the subroutine, or in a
parameter data area used by the subroutine. Programs,
Subprograms and Subroutines Programming Guide
In addition, an external subroutine can have its local data
area, in which the fields that are to be used only within
the subroutine are defined.
However, an external subroutine cannot have its own global
data area.

20 :: Tell me Can we update with histogram?

Hitogram retruns the one line output for each key value
from the inverted list. for histogram ADABAS does not have
access to data storage,therefore we can not do any update
add or delete using histogram.

21 :: Explain difference between read(1) and read work file once?

Read(1) file1 in physical sequence:
1. Used to raed adabas file.
2. here (1 ) represents the number of record to be read
its a processing loop eg

Read(1) file1 in physical sequence

read work file :
1. Used to read flate file.
2. Once option is used to read only one record
3. its not a processing loop

22 :: Explain difference between read work file 1 and read work file once? Why we are using work file once?

Both used to read sequentila file.
Read work file 1:

1. is a processing loop strating like:
Read work file 1 file1
end- work.
Here ---> file 1 is file name here and 1 is arbitary file
number which is translated into dataset names CMwk01 in jcl.

read work file once:
1. Reads only one reacord is to be read.
2. there is no processing loop
eg. Read work file once

23 :: How to find occurrence of MU and PE fields in a file?

Number of occurances in MU and PE can be found by c*field

If Adabas file having MU field 'switch' and has 5 values.
then in module you can find it by C*switch. this will have
value 5.

24 :: How to move cursor to a particular field when position is not known?

If you wish to position the cursor to a specified field,
you can use the MARK option,

and and to position to a
particular position within a specified field, you use the

1 #A (A10)
1 #B (N4)
1 #C (N4)
IF #A = ’ ’
COMPUTE #B = #B + #C

25 :: How many work file we can code in jcl?

In older version of ADABAS the limit used to be 32 files.
So now it will be eitehr the same or more.
IBM Natural Interview Questions and Answers
27 IBM Natural Interview Questions and Answers