Data Definition Specifications

DDS defines files to the OS of Power i Systems.

DDS is the language used to define data objects to the operating system. Compiling DDS generates an object definition template that consists of a generic object header, object specfic header and data object.

Physical File

A physical file object represents a database file containing data records. The records are grouped into physical file members and each member has its own access path to the data. Generally, a database file is created to have only one member which, by default, is added to the file when the file is created. However, multiple-member files can be generated. Members may be added to a physical file with the ADDPFM command.

     A****************************************************************
     A* PHYSICAL FILE- ADMCTLPF                                      *
     A*                                                              *
     A* FUNCTION     - This is the table for simple control entries  *
     A*                for the automated data management system      *
     A*                                                              *
     A* PROGRAMMER   - Steve Croy                99/99/9999          *
     A****************************************************************
     A****************************************************************
     A*               FILE ATTRIBUTE SECTION                         *
     A*                                                              *
     A*  KEY FIELDS: AMFUNC, AMCODE                                  *
     A*  MAXMBRS   : 1                                               *
     A*                                                              *
     A****************************************************************
     A****************************************************************
     A*                   MODIFICATION LOG                           *
     A*                                                              *
     A*  DATE       PROGRAMMER      DESCRIPTION                      *
     A*                                                              *
     A****************************************************************
     A                                      UNIQUE
      *---
     A          R RADMCTL                   TEXT('ADM CONTROL DATA')
     A            AMPRGM        10          COLHDG('Object' 'Function')
     A                                      TEXT('OBJECT - OPERATION')
     A            AMFUNC        10          COLHDG('Control' 'Function')
     A                                      TEXT('CONTROL FUNCTION')
     A*           AMCODE         3S 0       COLHDG('Seq')
     A*                                     TEXT('SEQUENCE')
     A*                                     EDTCDE(3)
     A            AMDESC        30A         COLHDG('Code description')
     A                                      TEXT('CODE DESCRIPTION')
     A            AMDATA       128A         COLHDG('Control Data')
     A                                      TEXT('CONTROL DATA')
     A            AMDATE         8S 0       COLHDG('Change' 'Date')
     A                                      TEXT('Change Date')
     A                                      EDTCDE(3)
     A            AMTIME         6S 0       COLHDG('Change' 'Time')
     A                                      TEXT('Change Time')
     A            AMUSER        10A         COLHDG('Change' 'User')
     A                                      TEXT('Change User')
      *---
     A          K AMPRGM
     A          K AMFUNC
     A*         K AMCODE

To override attributes of the file after it has been created, use the Override Database File (OVRDBF) command before the file is opened. To change attributes of the file after it has been created, use the Change Physical File (CHGPF) command.

Printer File

A printer device file is used to send records to a printer device. The printer device file identifies the printer device used and the spooling requirements; it does not contain data. You must Specify at least one record format in each file. The maximum number of record formats in a printer file is 1024. The maximum number of fields in any one record format is 32,767. The maximum combined length of all named fields and indicators in a record format is 32,767 bytes.

     A********************************************************************
     A*  PRINTER NAME - CSG074PR                                         *
     A*                                                                  *
     A*  FUNCTION    - This device file is the output for the CSG audit  *
     A*                missing IMB scans detail report.                  *
     A*                                                                  *
     A*  PROGRAMMER   - STEVE CROY               99/99/9999              *
     A********************************************************************
     A********************************************************************
     A*               FILE ATTRIBUTE SECTION                             *
     A*                                                                  *
     A*  RSTDSP    : *YES                                                *
     A*  MAXDEV    : 1                                                   *
     A*                                                                  *
     A********************************************************************
     A********************************************************************
     A*                   MODIFICATION LOG                               *
     A*                                                                  *
     A*   DATE   PROGRAMMER      DESCRIPTION                             *
     A********************************************************************
      *---
     A          R CSG074H1                  SKIPB(3)
     A
     A                                     5'Date:'
     A                                    12DATE EDTCDE(Y)
     A                                    46'Permanent General Companies'
     A                                    84'PGM: CSG074RP'
     A                                      SPACEA(1)
     A                                     5'Time:'
     A                                    13TIME
     A                                    47'Missing Scan Detail Report'
     A                                    84'Page:'
     A                                    90PAGNBR EDTCDE(3)
      *---
     A          R CSG074H2                  SPACEB(2)
     A                                     2'Policy'
     A                                    22'GUID'
     A                                    62'File'
      *---
     A          R CSG074D1                  SPACEB(1)
     A            POLNUM         9         2
     A            GUID          36        12
     A            FILENAME      26        50
      *---
     A          R CSG074T1                  SPACEB(2)
     A                                     4'****End of Report****'
     A            MISSTOT        9S 0     30EDTCDE(3)
     A                                    40'Missing Scans' 


The Create Printer File (CRTPRTF) command creates a printer device file from the information specified on the command and, optionally, from the data description specifications (DDS) contained in a source file.

Display File

The Create Display File (CRTDSPF) command creates a display device file. The device file contains the file description, which identifies the device used and, optionally, the record formats used by the device (if specified in data description specifications (DDS)); the device file does not contain data. The display device file sends records to one or more display devices associated with the device file, and to receive records from the display devices.

     A********************************************************************
     A*  DISPLAY NAME - SC0335DF                                         *
     A*                                                                  *
     A*  FUNCTION    - This display provides a maintenance panel for     *
     A*                object entries.                                   *
     A*                                                                  *
     A*  PROGRAMMER   - STEVE CROY                                       *
     A********************************************************************
     A********************************************************************
     A*               FILE ATTRIBUTE SECTION                             *
     A*                                                                  *
     A*  RSTDSP    : *YES                                                *
     A*  MAXDEV    : 1                                                   *
     A*                                                                  *
     A********************************************************************
     A********************************************************************
     A*                   MODIFICATION LOG                               *
     A*                                                                  *
     A*   DATE   PROGRAMMER      DESCRIPTION                             *
     A********************************************************************
     A*%%EC
     A                                      DSPSIZ(24 80 *DS3                  -
     A                                             27 132 *DS4)
     A                                      PRINT
     A                                      INDARA
     A                                      CF01
     A                                      CF02
     A                                      CA03
     A                                      CF04
     A                                      CF05
     A                                      CF06
     A                                      CF07
     A                                      CF08
     A                                      CF09
     A                                      CF10
     A                                      CF11
     A                                      CF12
     A                                      CF13
     A                                      CF14
     A                                      CF15
     A                                      CF16
     A                                      CF17
     A                                      CF18
     A                                      CF19
     A                                      CF20
     A                                      CF21
     A                                      CF22
     A                                      CF23
     A                                      CF24
     A                                      ROLLUP(90)
     A                                      ROLLDOWN(91)
     A                                      HOME
     A                                      HELP
     A          R SC033501
     A*%%TS  SD  20100106  081113  SCROY       REL-V5R4M0  5722-WDS
     A                                      BLINK
     A                                      OVERLAY
     A                                      CSRLOC(#ROW       #COL)
     A            #ROW           3S 0H
     A            #COL           3S 0H
     A            R1             3S 0H
     A            C1             3S 0H
     A            CHGFLDS        1A  P
     A            KEYFLDS        1A  P
     A            CMDFLDS        1A  P
     A            STSFLDS        1   P
     A            JOBNAM        10A  O  1  2COLOR(BLU)
     A            PRGNAM        10A  O  1 13COLOR(BLU)
     A                                  1 27'   iSoftwerks, Inc   '
     A                                  1 61SYSNAME
     A                                      COLOR(BLU)
     A                                  1 70DATE
     A                                      EDTCDE(Y)
     A                                      COLOR(BLU)
     A            USER          10A  O  2  2COLOR(BLU)
     A            JOBNBR         6A  O  2 13COLOR(BLU)
     A            Z$SEQ1        30A  O  2 23DSPATR(HI)
     A            FMTNAM         8A  O  2 61COLOR(BLU)
     A                                  2 70TIME
     A                                      COLOR(BLU)
     A            Z$MODE        10A  O  3 61
     A                                  4  2'Object........:'
     A            ZFOBNM    R        B  4 18REFFLD(RSCOBJS/EXOBNM *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&KEYFLDS)
     A                                  5  2'Object type...:'
     A            ZFOBTP    R        B  5 18REFFLD(RSCOBJS/EXOBTP *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&KEYFLDS)
     A                                  6  2'Description...:'
     A            ZFDESC    R        B  6 18REFFLD(RSCOBJS/EXDESC *LIBL/SCOBJSP-
     A                                      F)
     A                                      CHECK(LC)
     A                                      DSPATR(&CHGFLDS)
     A                                  7  2'Obj category..:'
     A            ZFCATS    R        B  7 18REFFLD(RSCOBJS/EXCATS *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                      EDTCDE(Z)
     A                                  8  2'Obj sequence..:'
     A            ZFCSEQ    R        B  8 18REFFLD(RSCOBJS/EXCSEQ *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                      EDTCDE(Z)
     A            EXPROC    R        O  8 35REFFLD(RSCOBJS/EXPROC *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&STSFLDS)
     A            ZFSTAT        30   O  8 38DSPATR(&STSFLDS)
     A                                  9  2'Obj source....:'
     A            ZFOBSR    R        B  9 18REFFLD(RSCOBJS/EXOBSR *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                  9 37'Added'
     A                                      DSPATR(HI)
     A                                  9 48'Changed'
     A                                      DSPATR(HI)
     A                                  9 59'Processed'
     A                                      DSPATR(HI)
     A                                 10  2'Source member.:'
     A            ZFOMBR    R        B 10 18REFFLD(RSCOBJS/EXOMBR *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A            ZFADDT    R        O 10 35REFFLD(RSCOBJS/EXADDT *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('    /  /  ')
     A            ZFCHDT    R        O 10 47REFFLD(RSCOBJS/EXCHDT *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('    /  /  ')
     A            ZFPRDT    R        O 10 59REFFLD(RSCOBJS/EXPRDT *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('    /  /  ')
     A                                 11  2'Source lib....:'
     A            ZFOBSL    R        B 11 18REFFLD(RSCOBJS/EXOBSL *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A            ZFADTM    R        O 11 35REFFLD(RSCOBJS/EXADTM *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('  :  :  ')
     A            ZFCHTM    R        O 11 47REFFLD(RSCOBJS/EXCHTM *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('  :  :  ')
     A            ZFPRTM    R        O 11 59REFFLD(RSCOBJS/EXPRTM *LIBL/SCOBJSP-
     A                                      F)
     A                                      EDTWRD('  :  :  ')
     A                                 12  2'Object lib....:'
     A            ZFOBLB    R        B 12 18REFFLD(RSCOBJS/EXOBLB *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A            ZFADUS    R        O 12 35REFFLD(RSCOBJS/EXADUS *LIBL/SCOBJSP-
     A                                      F)
     A            ZFCHUS    R        O 12 47REFFLD(RSCOBJS/EXCHUS *LIBL/SCOBJSP-
     A                                      F)
     A            ZFPRUS    R        O 12 59REFFLD(RSCOBJS/EXPRUS *LIBL/SCOBJSP-
     A                                      F)
     A                                 13  2'Compile Y/N...:'
     A            ZFCOMP    R        B 13 18REFFLD(RSCOBJS/EXCOMP *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                 14  2'Move obj Y/N..:'
     A            ZFMOVO    R        B 14 18REFFLD(RSCOBJS/EXMOVO *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                 15  2'Move src Y/N..:'
     A            ZFMOVS    R        B 15 18REFFLD(RSCOBJS/EXMOVS *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A                                 16  2'Use Alt cmd...:'
     A            ZFACMD    R        B 16 18REFFLD(RSCOBJS/EXACMD *LIBL/SCOBJSP-
     A                                      F)
     A                                      DSPATR(&CHGFLDS)
     A            ZFC001        60A  O 17 11DSPATR(&CMDFLDS)
     A            ZFC002        60A  O 18 11DSPATR(&CMDFLDS)
     A            ZFC003        60A  O 19 11DSPATR(&CMDFLDS)
     A            ZFC004        60A  O 20 11DSPATR(&CMDFLDS)
     A            ZFC005        16A  O 21 11DSPATR(&CMDFLDS)
     A******
     A            Z$KEY1        60A  O 22 11COLOR(BLU)
     A            Z$KEY2        60A  O 23 11COLOR(BLU)
     A*----------------------------------------------------------------
     A* SUBFILE MESSAGE QUEUE
     A*----------------------------------------------------------------
     A          R SC0335S2                  SFL
     A                                      SFLMSGRCD(24)
     A            MSGKEY                    SFLMSGKEY
     A            PRGNAM                    SFLPGMQ
     A          R SC0335C2                  SFLCTL(SC0335S2)
     A                                      SFLSIZ(2) SFLPAG(1)
     A  59                                  SFLEND
     A  59                                  SFLDSP
     A                                      SFLDSPCTL
     A N59                                  SFLCLR
     A  59                                  SFLINZ
     A            PRGNAM                    SFLPGMQ

The display file description contains of information that is specified in two places: (1) in the source file that contains the DDS (if used); and (2) in the CRTDSPF command. The DDS contains the specifications for each record format in the device file and for the fields in each record format. The Change Display File (CHGDSPF) or Override Display File (OVRDSPF) command is used in a program to change or override the parameter values specified in the display file description; the override command must be run before the display file is opened by the program. Overridden values are changed only for the running of the program; once the program ends, the original parameter values specified for the display file are used.