IBM Natural Interview Preparation Guide
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:

1 :: How to receive data passed through JCL parm parameter in a Natural program? How Data definition is defined in the program?

Normally in JCLs calling natural program, data is passed
using some control cards. In the natural program, the data
is received in the same order using INPUT statement similar
to STACK processing.

Data definition in Natural is done using following:

1 #VARIABLE1 (A10) /* Alphabetic variable of length 10

2 :: Explain difference between escape(top or bottom) and escape immediate(top or bottom?

ESCAPE TOP indicates that processing is to continue at the
top of the processing loop. This starts the next repetition
of the processing loop.

ESCAPE BOTTOM indicates that processing is to continue with
the first statement following the processing loop. The loop
is terminated and loop-end processing (final BREAK and END
DATA) is executed for all loops being terminated.

Whereas if you specify the keyword IMMEDIATE, no loop-end
processing will be performed(i.e.,final BREAK and END DATA
is not executed for all loops being terminated).

3 :: 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.

4 :: 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

5 :: 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.

6 :: 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

7 :: 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

8 :: 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.

9 :: 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.

10 :: 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)