Free AS400 FAQS AND EXPLAINATIONS
Free AS400 FAQS AND EXPLAINATIONS
If we tried to move year part of *ISO date into a field of length 3, what will happen ?
Ans:Program crashes, as in case of *ISO format it required fields of 4,2,2.
What is OVERLAY?
Ans:It allows a record format to be displayed on screen retaining the previous displayed record
formats.
What is the stored procedure and how do you define a stored procedure.
Ans:A stored procedure is a program that can be called to perform operations that can include
both host language statements and SQL statements. Procedures in SQL provide the same
benefits as procedures in a hot language. That is, a common piece of code need only be written
and maintained once and can be called from several programs. Stored procedures can be used
in both distributed and non-distributed applications.
Type of constraints
*REFCST - A referential constraint is being added
*UNQCST - A unique constraint is being added.
*PRIKEY - A primary key constraint is being added
*CHKCST - A check constraint is being added
*CASCADE –
The cascade delete rule is used. Deleting a record in a parent file causes matching records in the
dependent file to be deleted when data for a non-null parent key matches data for a foreign key.
Type of Update rule (UPDRULE)
*NOACTION – No Action
*RESTRICT –
Updating a record in a parent file is permitted if data for a non-null parent key does not match
data for a foreign key.
Updating a record in a parent file is restricted if data for a non-null parent key matches data for a
foreign key.
Writing an SQL statement from selecting records from TWO files using single statement
and Nested select statement.
Ans: Using Single statement.
SELECT * FROM FILE1, FILE2
WHERE FILE1.FLD1 = FILE2.FLD1
Can we have records (with fields from more than one file) from multiple files and Nested /
sub query in SQL ?
Ans:Yes, we can have record from multiple file with join condition and we also can have nested
query or subquery like SELECT * FROM FILE1 WHERE FILE1.FLD1 IN
(SELECT FILE2.FLD1 FROM FILE2)