Programming DDS for Physical and Logical Files
Total Page:16
File Type:pdf, Size:1020Kb
IBM i 7.2 Programming DDS for Physical and Logical files IBM Note Before using this information and the product it supports, read the information in “Notices” on page 89. This edition applies to IBM i 7.2 (product number 5770-SS1) and to all subsequent releases and modifications until otherwise indicated in new editions. This version does not run on all reduced instruction set computer (RISC) models nor does it run on CISC models. This document may contain references to Licensed Internal Code. Licensed Internal Code is Machine Code and is licensed to you under the terms of the IBM License Agreement for Machine Code. © Copyright International Business Machines Corporation 1999, 2013. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents DDS for physical and logical files............................................................................1 PDF file for DDS for Physical and Logical files.............................................................................................1 Defining physical and logical files using DDS.............................................................................................. 1 Defining a physical file using DDS.......................................................................................................... 1 Defining a logical file using DDS.............................................................................................................2 Simple- and multiple-format logical files in DDS.............................................................................2 Join logical files in DDS.....................................................................................................................3 Specifying record formats in a logical file in DDS.............................................................................3 Positional entries for physical and logical files (positions 1 through 44)............................................. 4 Sequence number for physical and logical files (positions 1 through 5)........................................ 5 Form type for physical and logical files (position 6)........................................................................ 5 Comment for physical and logical files (position 7).........................................................................5 Condition for physical and logical files (positions 8 through 16).................................................... 5 Type of name or specification for physical and logical files (position 17).......................................5 Reserved for physical and logical files (position 18)....................................................................... 6 Name for physical and logical files (positions 19 through 28)........................................................ 6 Record format..............................................................................................................................6 Field name................................................................................................................................... 8 Key field name............................................................................................................................. 8 Select/omit field name..............................................................................................................18 Reference for physical and logical files (position 29)....................................................................20 Length for physical and logical files (positions 30 through 34).....................................................21 Data type for physical and logical files (position 35).....................................................................23 Conversion of one numeric data type to another in a DDS file................................................ 26 Conversion between zoned decimal and character or hexadecimal in a DDS file...................26 Conversion of a field from floating point to packed decimal, zoned decimal, or binary in DDS....................................................................................................................................... 26 Conversion of data types when concatenating fields in DDS...................................................26 Conversion of data types when substringing fields in DDS......................................................27 Decimal positions for physical and logical files (positions 36 and 37)......................................... 27 Usage for physical and logical files (position 38).......................................................................... 28 Location for physical and logical files (positions 39 through 44)..................................................30 Keyword entries for physical and logical files (positions 45 through 80)................................................ 30 ABSVAL (Absolute Value) keyword for physical and logical files........................................................31 ALIAS (Alternative Name) keyword for physical and logical files.......................................................32 ALL (All) keyword—logical files only.....................................................................................................32 ALTSEQ (Alternative Collating Sequence) keyword for physical and logical files.............................. 33 ALWNULL (Allow Null Value) keyword—physical files only ................................................................ 34 CCSID (Coded Character Set Identifier) keyword for physical and logical files................................. 34 CHECK (Check) keyword for physical and logical files........................................................................ 36 CHKMSGID (Check Message Identifier) keyword for physical and logical files................................. 37 CMP (Comparison) keyword for physical and logical files.................................................................. 37 COLHDG (Column Heading) keyword for physical and logical files.................................................... 37 COMP (Comparison) keyword for physical and logical files................................................................38 Specifying COMP at the field level..................................................................................................39 Specifying COMP at the select/omit-field level............................................................................. 40 CONCAT (Concatenate) keyword—logical files only ........................................................................... 41 DATFMT (Date Format) keyword for physical and logical files ...........................................................43 DATSEP (Date Separator) keyword for physical and logical files........................................................45 DESCEND (Descend) keyword for physical and logical files............................................................... 46 DFT (Default) keyword—physical files only......................................................................................... 46 iii DIGIT (Digit) keyword for physical and logical files............................................................................ 48 DYNSLT (Dynamic Select) keyword—logical files only........................................................................ 49 EDTCDE (Edit Code) and EDTWRD (Edit Word) keywords for physical and logical files.....................51 FCFO (First-Changed First-Out) keyword for physical and logical files..............................................52 FIFO (First-In First-Out) keyword for physical and logical files..........................................................53 FLTPCN (Floating-Point Precision) keyword for physical and logical files .........................................53 FORMAT (Format) keyword for physical and logical files....................................................................54 JDFTVAL (Join Default Values) keyword—join logical files only..........................................................54 JDUPSEQ (Join Duplicate Sequence) keyword—join logical files only............................................... 55 JFILE (Joined Files) keyword—join logical files only...........................................................................57 JFLD (Joined Fields) keyword—join logical files only ......................................................................... 58 JOIN (Join) keyword—join logical files only.........................................................................................60 JREF (Join Reference) keyword—join logical files only ...................................................................... 62 LIFO (Last-In First-Out) keyword for physical and logical files...........................................................63 NOALTSEQ (No Alternative Collating Sequence) keyword for physical and logical files....................63 PFILE (Physical File) keyword—logical files only.................................................................................64 RANGE (Range) keyword for physical and logical files........................................................................65 Specifying RANGE at the field level................................................................................................66 Specifying RANGE at the select/omit-field level............................................................................66 REF (Reference) keyword—physical files only ....................................................................................67