IBM RPG400 Interview Questions And Answers

Download IBM RPG400 Interview Questions and Answers PDF

Refine your IBM RPG400 interview skills with our 20 critical questions. Our questions cover a wide range of topics in IBM RPG400 to ensure you're well-prepared. Whether you're new to the field or have years of experience, these questions are designed to help you succeed. Get the free PDF download to access all 20 questions and excel in your IBM RPG400 interview. This comprehensive guide is essential for effective study and confidence building.

20 IBM RPG400 Questions and Answers:

IBM RPG400 Job Interview Questions Table of Contents:

IBM RPG400 Job Interview Questions and Answers
IBM RPG400 Job Interview Questions and Answers

1 :: What is importance of MAPFLD IN OPNQRYF FILE?

Specifies the definition of query fields that are
mapped or derived from other fields. MAPFLD is generally
not needed if the field names specified on other parameters
are simple field names that exist in only one of the file,
member, and record format elements specified for the File
specifications (FILE) parameter.

Up to 50 mapped field definitions can be specified.
Read More

2 :: How can we know running job is batch or interactive?

From a CL program you can do a RTVJOBA command, if the job
type value is 0 then batch job, if 1 then interactive job.
Can take a WRKSMBJOB and see the value in TYPe field. If
*INT then it is interactive, If *BCH,then batch job.
Read More

3 :: Need a sql query: retrieve all duplicate records in table?

let us assume we have some duplicate records in sample table
and we can identify duplicates with eid.

The the query looks like this.

Select * from sample
where eid=any
(select eid from sample having count(eid)>1 group by eid);

Note: This should be used SQl .. but i never tried in as400
when ever it is necessary means i use following sql
statement in as400 .......

select * from sample where eid=111

it displays all duplicate records related to 111
Read More

4 :: WHAT IS MENT BY RECORD LEVEL IDENTIFIER?
WHAT IS THE PURPOSE OF THIS?

Record level Identifier gives the information about the
specific record format in the file. This can be used to
make sure that the record format of the file is same at
present as it was when the program was compiled.This will
protect the program from going into error due to changes
made to the record format after the compilation of the
program.The system tells the program, when it tries to open
the file, that a significant change occurred to the
definition of the file since the last time the program was
compiled.
Read More

5 :: If my rpg program has a date field, What extra care I have to take while compiling that RPG program?
If the file is keyed and I have declared the file as well as Key list properly in my program. Still am getting an error message like "Chain/reade operation is not allowed" What may be the case?

format of variable, length of variable should be date and sep(-/).should be define

extra key "A"

May be you have define you file as output mode
Read More

6 :: Suppose my file has 10 fields and I want to make the 2nd field Zeros in all records. And assume I have millions of records and I dont want to read each record and update the desired field with 0. Any other way to do this in one step operation?

Using SQL, we can set second field value as '0'
Read More

7 :: Assume my file has 100 records and I want to see only first 10 records. Is this possible through LF?

Based on RRN number we can retrieve the first 10 records
or otherwise copy the first 10 records using CPYF command
and you can use RUNQRY for new created file
Read More

8 :: Suppose I have 3 jobs A B and C. I want to submit B after successful completion of A and want to submit C after successful completion of B. Without using job scheduler or job queue, how can i do that through CL program?

Write a CL program in which u have to submit the 'A' job
after completion you can write code for 'B' and after 'C'
Read More

9 :: What is difference between Bind by copy and bind by reference?

bind by copy: here module will static
bind by reference: here module will be dynamic.
Read More

10 :: Why we cannot call a service program? If I add a PEP can i call the service program?

There is no PEP parameter for CRTSRVPGM command so question
is invalid.
Read More

11 :: What are the types of identifiers?

Basically we know 3 type of identifier

1. is numeric which we denotes pic 9(2) like.
2. is alphabetic which we denotes pic A(2) like.
3. is alphanumeric identifier which we denotes pic x(2)like
Read More

12 :: What is file identifier where we can use?

system will genaret the uniqe file identifier for every
file.system identifies file thourh that identifier.supose u
can call a file throuh an other program but u do any
change after that file identifier will change.u got error
on that time level check error cause u r file identifier
was changed.
Read More

13 :: Explain MDT?

MDT is a internal indicator.It is used when we are using
SFLNXTCHG in SFL.MDT indicator default in on mode.
breifly when we are using readc for read changed
records.MDT is internally on for every record .If retreive
the record once MDT is going to be off.for that purpose we
used SFLNXTCHG keyword to seton.
Read More

14 :: How can we override a file during runtime in RPG? Without using OVRDBF or calling a CL program?

Use EXTFILE on F Specs
Read More

15 :: What is the length of Signature?

the length of the signature is 16 bit like g2g4h5v3f3v4546k
Read More

16 :: We have job which is running as batch. it takes atleast 06hours to complete tht job. bu i wanna do tht job with in 3hours?

we have to create multiple threads in the job. when we
submit the job ,multiple threads will run parallelly. so it
will take very less time to complete the job. This is the
best way I believe.
Read More

17 :: How can we search particular records from the database file in RPG. For example, there are
100 records in the file.i need to retrieve all the records matching/equal to the particular NAME field. How can we do the above using SEARCH criteria other than using the IF cond?

This can be done using the Key Field.

KEY1(NAME FIELD) SETLL FILENAME
KEY1(NAME FILED) READE FILENAME
Read More

18 :: What is the difference between ITER and DO ? I know both are used to execute set of statements repeatedly, but what is the main difference?

There is no comparision between DO and ITER as DO statement
is an looping statement and ITER is an branching statement
like LEAVE.
When I use ITER with some condition inside a DO-ENDDO loop,
when that condition occouerd, ITER transfered the control
to ENDDO not out of the loop like LEAVE ie it just skip the
excecution of statements between ITER and ENDDO.

In one statement we can say that ITER in RPGLE is same as
CONTINUE in C.
Read More

19 :: Errors in Sql query will be in which state?

SQL statment is error in embeded sql, then SQL code will
give the negative value.
Read More

20 :: This is rpg3 code
W0RTN IFEQ @CN,002
What is the means @CN,002?

@CN is an array and @CN,002 represents the 2nd element of
that array
Read More