Professional Documents
Culture Documents
DDS Lab Exercises - Creation of Physical File, Field Reference File
DDS Lab Exercises - Creation of Physical File, Field Reference File
DDS Lab Exercises - Creation of Physical File, Field Reference File
1. Create a physical file EMPMST with the following fields and key
field empid.
Exercise instructions
_____1. In this exercise you are going to write a PF EMPMST in your library
that includes all the fields given below.
EMPCDE 5 Zoned
EMPNAM 30 Alphanumeric
EMPDOB L Date
EMPDEP 2 Alphanumeric
EMPAD1 25 Alphanumeric
EMPAD2 25 Alphanumeric
EMPAD3 25 Alphanumeric
EMPHN 14 Zoned
EMTRDT L Date
EMTRTM T Zoned
EMTUSR 10 Alphanumeric
_____3. Create a DDS for the EMPMST with the following record formats
specifications .
Exercise instructions
_____1. In this exercise you are going to write a PF FLDREF in your library that
includes all the fields which one defined in EMPMST.
_____2. Create a DDS for the FLDREF with the following fields.
EMPCDE 5 Zoned
EMPNAM 30 Alphanumeric
EMPDOB L Date
EMPDEP 2 Alphanumeric
EMPAD1 25 Alphanumeric
EMPAD2 25 Alphanumeric
EMPAD3 25 Alphanumeric
EMPHN 14 Zoned
EMTRDT L Date
EMTRTM T Zoned
EMTUSR 10 Alphanumeric
Exercise instructions
_____1. In this exercise you are going to write a PF EMPMST1 in your library
by referring all fields from FLDREF.
_____2. Create a DDS for the PF EMPMST1 with the following record format
specification .Refer all fields in the field reference file.
Exercise instructions
_____1. In this exercise you are going to write a PF EMPMST1.A in your library
by referring all fields from FLDREF.
_____2. Create a DDS for the PF EMPMST1.A with the following record format
specification .Refer all fields in the field reference file.
_____4. Give COLHDG for all fields in EMPMST1.After you had given REFFLD
and referring from file REF(File level keyword)
Exercise instructions
_____1. In this exercise you are going to write a PF EMPMST2 in your
library that includes all the fields of EMPMST and define empnam as the key.
_____2. Create a DDS for the EMPMST2 with the following record formats
specifications . Define employee name as the key field.
EMPCDE 5 Zoned
EMPNAM 30 Alphanumeric
EMPDOB L Date
EMPDEP 2 Alphanumeric
EMPAD1 25 Alphanumeric
EMPAD2 25 Alphanumeric
EMPAD3 25 Alphanumeric
EMPHN 14 Zoned
EMTRDT L Date
EMTRTM T Zoned
EMTUSR 10 Alphanumeric
Exercise instructions
_____1. In this exercise you are going to include file level keywords UNIQUE,
FIFO,LIFO,FCFO
FIFO – See whether records are arranged in first in first out order when duplicate
key values are given.
LIFO – See whether records are arranged in last in first out order when duplicate
key values are given.
FCFO – See whether records are arranged in first changed first out order when
duplicate key values are given.
Exercise instructions
_____1. In this exercise you are going to include key field keywords ABSVAL,
DESCEND.
_____2. Create a DDS for the file EMPMST3 which is based on EMPMST3 with
the following record formats specifications . In EMPMST3, define
employee id as the key field.
_____3. In EMPMST3,give descend for empid key field. When you give
DESCEND keyword check whether employee records are listed in
descending order.
_____4. Give ABSVAL for the empid field in PF. When you give ABSVAL,
check whether absolute value is obtained.Give descend and absval
and see whether records are arranged with absval and descending
order.
Exercise instructions
_____1. In this exercise you are going to include field level keywords ALIAS,
ALWNULL, CHECK(AB),CHECK(MF) , CHECK(ME), COLHDG,
EDTCDE, EDTWRD, RANGE, REFFLD ,COMP,VALUES,CHKMSGID,
VARLEN.
_____2. Create a DDS for the file EMPMST4 based on EMPMST4 with the
following record formats specifications . Specify the following
keywords.
_____3. Give ALIAS name ie alternate name to field EMPNAM. Set ALWNULL
for AMOUNT FIELD.Give range of values ( 2000 5000) to EMPSAL
and select EMPSAL for range of values.Give values keyword for
DEPID field as ’IT’,’PR’,’SA’,’TR’.
_____5. When you give COLHDG ,specfies column heading for fields.
_____6. Give DFT values for DEPID as ‘IT’ & EMPSAL fields as 1234.
_____7. Give DATFMT as *DMY and DATSEP as ‘/’ and TIMFMT as *HMS and
TIMSEP as ‘:’.
_____9. Check for salary field for Check ME – Field must be entered
mandatorily ,CHECK MF – Mandatory fill of that value.
_____10. Give EDTCDE for transaction date field (or) DOB field.Give the
EDTCDE keyword ‘ Y’ for date edit for DOB field . Give edit code Z for
suppressing zeros.
_____11. Give EDTWRD for amount field (‘ - - ‘). Give edtwrd for phone
number field (Country_code-Area_code-Phone_number).
_____12. Give CHKMSGID for COMP,VALUES & RANGE keyword and see
whether the error message is coming.