0% found this document useful (0 votes)
150 views2 pages

IBM AS400 Interview Questions Explanations

This document contains interview questions and answers related to IBM AS400. Some key questions covered include: - What are host variables in embedded SQL statements. - Which CL command can determine file dependencies. - What can DFU programs do to records. - When are unique and referential constraints executed. - How triggers are associated with files. - How embedded SQL can insert, update, delete records and fetch values. - How to trap errors and redirect files during program execution. The document provides explanations for various AS400 and SQL-related interview questions.

Uploaded by

Sharique Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
150 views2 pages

IBM AS400 Interview Questions Explanations

This document contains interview questions and answers related to IBM AS400. Some key questions covered include: - What are host variables in embedded SQL statements. - Which CL command can determine file dependencies. - What can DFU programs do to records. - When are unique and referential constraints executed. - How triggers are associated with files. - How embedded SQL can insert, update, delete records and fetch values. - How to trap errors and redirect files during program execution. The document provides explanations for various AS400 and SQL-related interview questions.

Uploaded by

Sharique Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

IBM AS400 Interview Questions Explanations

Tags:IBM AS400 Interview Questions,IBMAS400 Interview Questions and


Answers,COBOL400 Interview Questions,DB400 Interview Questions

A program variable coded in an Embedded SQL statement is referred to as?


Ans:Host Variable

Which of the CL command can be used to determine which logical files are dependent on
a specific file?
Ans:DSPDBR

What does DFU program you to do on a record?


Ans:Insert, Update Delete & File Enquiry.

When are the Unique Constraints executed?


Ans:During Insert.

When are the Referential Constraints executed?


Ans:Insert, Update & Delete.

How many triggers can be associated with a file?


Ans:6(Maximum)

Why is the Declare cursor statement is used for?


Ans:To define & name the cursor & specify rows to be fetched.

What do we can do with the Embedded SQL statements?


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

Which CL command is used to trap error messages during program execution?


Ans:MONMSG

Which CL command can be used at program execution to redirect the file named in an
RPG program?
Ans:OVRDBF

What is the length of the variable in the given example?


Ans:DCL VAR (&Name) TYPE (*Char)? Default 32 & for Decimal 15,5
We can determine weather a record is in use bye another user with the help of status code
(*STATUS). If
*STATUS = 01218 i.e. record already locked.

How to write *PSSR ?


Ans:It just similar to any other subroutine.
*PSSR BEGSR
………………
………………
…………….
ENDSR

What is Procedure ?
Ans:A procedure is the set of self contained high level language statements that can perform a
particular task and then returns to a caller.

1
What is Procedure Prototype and Procedure Interface.
Ans:
Procedure Prototype
In this section we specify the name of the procedure along with PR.
D PROC1 PR
Procedure Interface
It is section where we define all the parameter which are receiving or returning some values.
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0

How to define a procedure ?


Ans:
First we have define Procedure Prototype along with all parameter. And PR.
D PROC1 PR
Then define Procedure with Begin/End
Procedure Name Begin/End
P PROC1 B Export
Then define Procedure Interface along with parameter and PI
D PROC1 PI 5 0
D PARMA 5 0
D PARMB 5 0
Define all the parameters as a variable to the procedure
D PARMA S 5 0
D PARMB S 5 0
In not returnable procedure, the procedure should end with
C PROC1 E
In returnable procedure, it should end with
C RETURN PARMA + PARMB

You might also like