Dictionary Examples                                                                                                (Advanced – Dictionary Examples – 10-19-06)

 

 

·         Dictionary Layout

 

001  Required                                                                   Dictionary Type – Simple (D) or Complex (I or V)

002  Required                                                                   Field or Expression – Field (attribute) or command

003  Optional                                                                     Conversion Code – D2  MD2,  MCT

004  Optional (Suggested)                                                Column Heading – LAST NAME, BALANCE, ZIP CODE

005  Required                                                                   Column Width & Justification – Text L, Numeric R, Full Text Wrap T

006  Required                                                                   Attribute Value Code – Extracting S or M

007  If Necessary                                                              Association Attribute – Linking dictionaries

 

 

·         Conversion Codes

 

Data to be converted: 10959

D2                                     01 JAN 98                                International date, 2 digit year

D4                                     01 JAN 1998                            International date, 4 digit year

D2-                                    01-01-98                                  Month-day-2 digit  year

D2/                                     01/01/98                                  Month/day/2 digit year

DM                                     01                                            Month in numeric value

DQ                                    1                                              Quarter in numeric value

DMY                                  01 1998                                   Month in numeric value with 4 digit year

 

Data to be converted: 100000 and 5575

MD2                                   1000.00                                   Numeric dollar value, 2 decimal places

MD2,                                  1,000.00                                  Numeric dollar value with commas, 2 decimal places

MD2,E                               <1,000.00>                              Negative dollar numeric value, with commas, 2 decimal places

MD3                                   5.575                                       Numeric percentage value, 3 decimal places

 

Data to be converted: MARTHA, 123 EASY STREET, 123 MAIN STREET, 123 ˝ SOUTH STREET - #102

MCT                                  Martha                                     Alpha upper/lower case letters

MCA                                  EASYSTREET                        Alpha characters only, no other characters

MCN                                  123                                          Numeric characters only, no alpha characters

MC/A                                 123  -  #  /                                All non-alpha characters

 

 

 

·         Editor Commands – For use within dictionaries or Procs/Paragraphs

*--: P  (Display 1 screen of lines)

*--: line #  (Go to specified line number)

*--: T  (Go to Top of item)

*--: B  (Go to Bottom of item)

*--: I  (Turn on Insert mode)

*--: DE  (Delete line)

*--: DE4 (Delete current line and next 3 lines)

*--: C/old/new  (Change first occurrence of pattern match old with new)

*--: C/old/new/G  (Globally change every occurrence of pattern match old with new on this line)

*--: C/old/new/G5  (Globally change every occurrence of pattern match old with new on this line and the next 4 lines)

*--: R  (Replace entire line of text)

*--: A  (Append character(s) to end of line; use a space, if necessary, and additional text)

*--: OOPS  (Will undo last entry)

*--: EX  (Exit item without saving changes)

*--: FI  (File Item and exit)

*--: SAVE  (Save item but do not exit)

*--: FD  (File Delete item)

*--: SPOOL  (Spools entire item to default printer)

*--: XEQ n  (Executes ‘n’ program/Proc/Paragraph/sentence from within the editor)

*--: LOAD XXX (Load from Proc/Paragraph XXX lines ? through ??)

*--: DUP (Will duplicate the previous line)

*--: DUP5 (Will duplicate the previous line 5 times)

*--: < and > (Marks beginning and ending line(s) to copy)

*--: COPY (Copies previously marked line(s))

*--: MOVE (Move previously marked line(s))

*--: HELP  (On-line help for editor commands)

 

·         Single field (attribute) from the same file

 

CLIENT file – RBS_LASTNAME

 

001  D                                  Simple

002  1                                  Field (attribute) 1

003                                     Blank (Space RETURN)

004  LAST NAME                          Report column heading

005  20T                                20 characters wide, text wrap

006  S                                  Extracting a single value

 

 

·         Single field (attribute) from the same file

 

CLIENT file – RBS_BIRTH

 

001  D                                  Simple

002  16                                 Field (attribute) 16

003  D2                                 International date, 2 digit year (i.e. 12 JAN 98)

004  BIRTHDATE                          Report column heading

005  9R                                 9 characters wide, right justified

006  S                                  Extracting a single value

 

 

·         Single field (attribute) from the same file

 

TRAN file – RBS_BALANCE

 

001  D                                  Simple

002  1                                  Field (attribute) 1

003  MD2,                               Numeric dollar value with commas, 2 decimal places

004  BALANCE                            Report column heading

005  15R                                15 characters wide, right justified

006  S                                  Extracting a single value

 

 

·         Field’s (attribute’s) multivalue from the same file

 

CLIENT file – RBS_RES_CITY

 

001  I                                  Complex

002  EXTRACT(@RECORD,2,3,0)             Extracting field (attribute) 2, multivalue 3, no subvalue

003  MCT                                Upper/lower case of alphabetic characters

004  RES CITY                           Report column heading

005  15L                                15 characters wide, left justified

006  S                                  Extracting a single value

 

 

·         Field’s (attribute’s) multivalue subvalue from the same file

 

CLIENT – RBS_PIN_DATE

 

001  I                                  Complex

002  EXTRACT(@RECORD,33,7,2)            Extracting field (attribute) 33, multivalue 7, subvalue 2

003  D2                                 International date, 2 digit year (i.e. 12 JAN 02)

004  DATE}PIN}ALTERED                   Report column heading – stacked

005  9R                                 9 characters wide, right justified

006  S                                  Extracting a single value

 

 

·         Single field (attribute) from the same file displayed as multiple values

 

CLIENT file – RBS_RES_ADDR

 

001  D                                  Simple

002  2                                  Field (attribute) 2

003                                     Blank (Space RETURN)

004  RES ADDR                           Report column heading

005  45T                                45 characters wide, full text wrap

006  M                                  Extracting a multivalue

 

  

·         Single field (attribute) from the same file displayed as a single value

 

CLIENT file – RBS_RES_ADDR

 

001  D                                  Simple

002  2                                  Field (attribute) 2

003                                     Blank (Space RETURN)

004  RES ADDR                           Report column heading

005  45T                                45 characters wide, full text wrap

006  S                                  Extracting a single value

 

 

·         Single field’s (attribute) from a different file with the same key (@ID)

 

ACCOUNT file – RBS_POS_BAL

 

001  I                                  Complex

002  OCONV(@ID, "TTRAN;X;;6") * -1 /100 Output conversion, use key (@ID), translate to TRAN, obtain no multivalue of field (attribute) 1 and multiply the result by -1 then divide by 100

003  MD0,                               Numeric value, 0 decimal places, using commas

004  POS BAL                            Report column heading

005  15R                                15 characters wide, right justified

006  S                                  Extracting a single value

 

 

·         Performing a mathematical function

 

ACCOUNT file – RBS_LOC_AVAIL

 

001  I                                  Complex

002  CRLIM + BALANCE                    Adds positive value of CRLIM to negative value of BALANCE

003  MD2,                               Numeric value, 2 decimal places, using commas

004  LOC AVAIL                          Report column heading

005  15R                                15 characters wide, right justified

006  S                                  Extracting a single value

 

 

Go to Home Page