NATURAL Quick References · 2019. 7. 23. · Page 2 System Commands System Command Definition CLEAR...

28
Page 1 Understanding Seminar Series: Natural Quick Reference

Transcript of NATURAL Quick References · 2019. 7. 23. · Page 2 System Commands System Command Definition CLEAR...

  • Page 1

    Understanding Seminar Series:

    Natural Quick Reference

  • Page 2

    Notes:

  • Page 1

    PROGRAMMING OBJECTS .......................................................................................................................... 1

    SYSTEM COMMANDS.................................................................................................................................. 2

    TERMINAL COMMANDS ............................................................................................................................. 5

    Terminal Command ............................................................................................................................... 5

    SYSTEM VARIABLES .................................................................................................................................... 5

    NATURAL VARIABLES AND DEFINITIONS................................................................................................ 5

    THE PROGRAM EDITOR AND IT'S COMMANDS ...................................................................................... 6

    EDITOR COMMANDS ...................................................................................................................................... 7EDITOR LINE COMMANDS ............................................................................................................................. 10

    DATA AREA EDITOR AND IT'S COMMANDS .......................................................................................... 11

    DEFINING DATA AREA TERMS........................................................................................................................ 11DATA AREA COMMANDS .............................................................................................................................. 12DATA AREA LINE COMMANDS....................................................................................................................... 13

    THE MAP EDITOR AND IT'S COMMANDS ............................................................................................... 14

    BASIC MAP SETTINGS FOR MAP SCREEN.......................................................................................................... 15THE MAP EDITOR ......................................................................................................................................... 17MAP EDITOR PFKEYS .................................................................................................................................... 18MAP EDITOR LINE COMMANDS ..................................................................................................................... 19MAP EDITOR FIELD COMMANDS.................................................................................................................... 19

    BASIC ADABAS USAGE ............................................................................................................................. 21

    CREATE YOUR OWN CHEAT SHEET......................................................................................................... 24

    ADABAS, NATURAL, PREDICT, NATURAL Security are registered trademarks of Software AG Americas and Software AG ofDarmstadt, Germany.

  • Page 2

    Notes -

  • Page 1

    This is a quick reference for the programmer to use on a daily basis.

    Programming Objects

    Programming Objects are modules where business processing takes place. Interface Objects are modules which create output for a user to interact with

    such as screens or report layouts. Data Objects are modules which contain data definitions, both programmer

    defined and database definitions.

    Object Type Abbreviation

    Object Type

    Program P Programming

    Subprogram N Programming

    Subroutine S Programming

    Copycode C Programming

    Map M InterfaceLocal Data Area L DataParameter DataArea

    A Data

    Global Data Area G DataHelproutine H Programmin

    g

  • Page 2

    System Commands

    SystemCommand

    Definition

    CLEAR Used to clear edit buffer. This will remove any NATURALobject currently occupying the edit buffer, includingprograms, maps, or data areas. It is sometimes a good ideato clear the edit buffer prior to running a test of a system.

    DELETE Used to remove NATURAL objects permanently from thelibrary. This command is typically used to remove all tracesof an object. You should be very cautious about removingthe source and not the object of the program. Also, thiscommand allows you to "wildcard" by placing an "*" wherewildcarding should begin. For example, DELETE ABC*deletes all parts of any object starting with "ABC". A list ofmodules starting with "ABC" will appear to allow selection ofindividual modules to delete. This is also very powerful andshould be used cautiously.

    Syntax : DELETE

    : for a selection list of objects of one type(only applies in conjunction with asterisk notationfor ).

    : the name of the object to be deleted. Youcan specify one or more names. '*' or 'name*'results in a selection list of objects in the currentlibrary.

    'S' only source is deleted.'O' only cataloged object is deleted.'B' both, source and cataloged object are deleted

    (default).

    Examples : 1) DELETE PROG1 B2) DELETE ABC*3) DELETE PROG1 S PROG2 S PROG34) DELETE M ABC*

    EDIT Invoke a NATURAL editor for the purpose of editing an objectExamples : 1) EDIT PROG1

    2) E PROG1EXECUTE Execute a NATURAL object module. Any program currently

  • Page 3

    in the source program work area will not be affected. Simplytyping a NATURAL program name at the command line andpressing ENTR also executes the object.

    Examples : 1) EXECUTE PROG12) PROG1

    FIN Terminate a NATURAL session (in interactive mode or inbatch mode).

    GLOBALS Invokes GLOBALS session description.HELP Invokes the NATURAL online help facility. All NATURAL

    syntax is available via the HELP facility, as well as a definitionof all error messages and commands. Typing "?" at thecommand

    Examples : 1) EXECUTE PROG12) PROG1

    LAST ,LAST (parm)

    Display command(s) last executed and execute it (them)again on request. (Parms - ‘ ‘last command entered, ‘-’ one command back, ‘-n’ command back n times, ‘*’ displays list of last nine commands.)

    LIST Lists object or information requested. Information caninclude program listing, list of objects, directory information,etc. Certain editor commands can be used by placing theirabbreviation next to the module to be operated on. Some ofthese commands include “ST” for STOW, “E” for EDIT, “DE” for DELETE, “L” for list the source.

    LOGOFF Logs user out of session.MAINMENUON/OFF

    Turns NATURAL MAIN MENU on or off as needed.

    PROFILE Invokes the Security Profile for the session.PURGE Delete one or more source programs from the NATURAL

    system file.READ Transfer an object in source form from the NATURAL system

    file to the source work area.RENAME Changes the name of source and/or object.RUN Compiles source code currently in editor and executes.SCRATCH Deletes both object and source from editor.SCAN Scan an object for a specified string of characters. (The

    source work area is used by the SCAN command and will bedestroyed) The object may be a single object, all objectsbeginning with a specified value, or all objects within alibrary. The SCAN may also be restricted to a specific objecttype.

    STOW Store an object (in both source and cataloged object form) inthe NATURAL system file.

    TEST Invokes the debugging facility. ' TEST ON' : Activate test

  • Page 4

    mode of the debugging facility. ' TEST OFF'‘ : Deactivate test mode of the debugging facility. ' TEST' : Main menu ofdebugging facility will be invoked.

    UPDATE Enable or prevent data base updating. ‘ON ‘: Data base updating will be performed. ‘OFF’: Database updating willnot occur (STORE, UPDATE, DELETE)

    XREF Control the usage of the PREDICT active cross referencefacility (if Active Cross Reference selectable unit is installed).

    As a Programmer, three of the most important commands to you will be “SAVE”, “CATALOG”, and “STOW”.

    SAVE STOW CATALOGStores only source code SAVEs the source, does a

    syntax check, compilesthe code, then storescompiled object.

    Does a syntax check,compiles the code, thenstores compiled object.

    DOES NOT syntax check orcompile.

    DOES NOT save sourcecode.

    Also, the commands “PURGE”, “SCRATCH”, “DELETE”, and “UNCATALOG” are very important because the let you remove any ad hoc, unused or debugging programswhich are not for use in any system.

    PURGE SCRATCH UNCATALOG DELETERemoves ONLY thesource code.

    Removes BOTHsource andcompiled code.

    Removes ONLY thecompiled code.

    Gives you thechoice of removingthe source or thecompiled code.

    DOES NOT removecompiled code.

    DOES NOT removethe source code.

    Can remove either,leaving eithersource orcompiled.

  • Page 5

    Terminal Commands

    Terminal Command Description%H or %H Send the screen and any additional

    output to a specified printer.%K This will simulate the pressing of a

    PFKey. For example %K3 will be thesame as pressing PF3.

    %% Stops the execution of the currentlyrunning NATURAL program. This isespecially useful if you have a bug thatwill not let you out of your program. Ifyou can type %% the program will stop.

    %? Invokes the HELP facility for TerminalCommands.

    System Variables

    6

    NATURAL System VariablesNATURAL System Variables*APPLIC-ID *ERROR-NR *LIBRARY-ID *PROGRAM*APPLIC-NAME *ERROR-TA *LINE-COUNT *STARTUP*COM *ETID *LINESIZE *STEPLIB*COUNTER *GROUP *LOG-LS *SUBROUTINE*CURS-COL *HARDCOPY *LOG-PS *TPSYS*CURS-FIELD *INIT-ID *NUMBER *USER*CURS-LINE *INIT-PROGRAM *OPSYS *USER-NAME*CURSOR *INIT-USER *PAGESIZE *WINDOW-LS*DATA *ISN *PAGE-NUMBER *WINDOW-POS*DEVICE *LANGUAGE *PF-KEY *WINDOW-PS*ERROR-LINE *LEVEL *PF-NAME

    *DATD *TIMD(R)*DATE *TIME*DATG *TIMESTMP*DATI *TIME-OUT*DATJ *TIMN*DATN *TIMX*DATU*DATX

    NATURAL Variables and Definitions

  • Page 6

    The Program Editor and It's Commands

    The Program Editor is used to create or maintain NATURAL Objects, includingPrograms, Subprograms, Subroutines, Copycode, and Helproutines.

    The first line of the editor is called the Command Line and is used as follows:

    “?” to invoke online helpHelp includes all syntax, system variables, system commands, error codes

    and includes the same basic information as the reference manual. Entering NATURAL system commands User defined commands

    These may be compiled NATURAL program names in the current library orany steplib.

    Changing the editor PROFILE Entering Edit and positioning commands “Q”, “QUIT”, or “.” to leave the editor “F” or “FIN” to end a session Entering Editor Commands (SAVE, CHECK, etc.)

    To change the object type being maintained in the editor, the SET TYPE commandcan be issued.

    8

    NATURAL Field FormatsNATURAL Field Formats

    A Alphanumeric 1-253 Default 10 B Binary 1-126 C Control D Date (P6) F Floating Point 4,8 I Integer 1,2,4 L Logical N Numeric 1-27 Default 7 P Packed 1-27 Default 7 T Time (P12)

    The following are the allowed formats, lengths and defaults forThe following are the allowed formats, lengths and defaults forNATURAL variables.NATURAL variables.

  • Page 7

    Command DescriptionSET TYPE N Changes editor to

    subprogram.SET TYPE P Changes editor to program.SET TYPE S Changes editor to

    subroutine.SET TYPE C Changes editor to copycode.

    Editor Commands

    There are a number of commands that are valid in the program and data areaeditors only. These commands are only issued on the editor command line.

    Command DescriptionADD Add window of 9 empty lines on screen (if direction indicator is +,

    lines are placed after last line, if direction indicator is a minus sign,lines are placed before first line). Lines left blank are deleted whenENTER is pressed.

    CANCEL Leaves the editor without saving the source code.CHANGE Scan for 'scandata' and replace with 'replacedata'. Syntax is:

    CHANGE 'scandata'replacedata'CLEAR Clear the edit source work area.DX, DY, DX-Y Delete X marked line, Y marked line, or a block of lines delimited

    by X and Y.EX, EY, EX-Y Delete source lines from top down to (not including) X marked

    line; from line following Y marked line down to bottom; or all linesexcluding block delimited by X and Y.

    EXIT Leave the editor with saving the source code. If the EXIT flag is setin the profile, the EXIT function window appears. You can use exitwith or without save or resume in the editor

    LAST, LAST -,LAST nn, LAST*

    LAST: the last command entered will be placed in the commandline.

    LAST - : the last command entered will be placed in the commandline. If you enter “LAST –“ again the next to last command willappear. You can page backwards through the last 20 commandsby repeatedly entering “LAST –“.

    LAST nn: If “nn” = 4, the fourth to last commandwill appear on thecommand line.

  • Page 8

    LAST *: A window displaying the last 9 commands. To reissue asingle command, mark the command with any character. Toissue several commands, mark them with numbers in the orderthey are to execute.

    LET If entered as first edit command, only edit commands will beexecuted (line commands and line changes since last ‘ENTR’ will be ignored).

    N Renumber program currently in source work area.PROFILE Display current editor profile.QUIT Same as edit command CANCEL.REN ON/OFF “ON” causes the NATURAL source programs to be renumbered

    with each SAVE or CATALOG command. (Default) “OFF” Automatic renumbering is not in effect.

    RESET Delete X and/or Y line markers, and markers set with .N linecommand.

    S Split Screen command. Split places the requested module at thebottom half of the editor for viewing. No changes are allowed inthe bottom of the split screen. The commands for splitting thescreen are:S V = View N = Subprogram

    P = Program C = CopycodeD = Data Area

    Syntax would look like S V EMPLOYEES

    Positioning in the split screen is done using the positioningcommands (B, T, +/-, +H/-H, +P/-P, +nnn/-nnn) preceeded by the“S” of the Splitcommand such as S +10 to move forward 10 linesin the split screen.

    To end Split screen, type S E in the command line.SCAN'scanvalue'

    Scan for 'scanvalue'. If no scanning value is entered, the SCANwindow appears. The lines in which the scan value is located ismarked with "S" to left of the line.

    SCAN = +/- Determine the direction of SCAN function, either starting on thecurrent line and going forward (+), or backwards (-).

    SET ABSON/OFF

    “ON” SCAN and CHANGE operate in absolute mode ,i.e. the value need not be delimited by blanks or special characters. “OFF” Operation in non absolute mode, i.e. the value must be delimitedby blanks or special characters. (Default)

    SET ESCAPE‘char’

    Character that must precede line commands. Default is '.'

    SET TYPE Change type of object to be edited. Type may be PROGRAM,SUBROUTINE, SUBPROGRAM, HELPROUTINE, or COPYCODE.

    SHIFT nn/+nn Shift source lines delimited by X and Y markers nn positions to the

  • Page 9

    left or right; comment lines are not shifted.SHIFT --/++ Shift source lines delimited by X marked and Y marked lines to

    leftmost / rightmost (max. 99 ) positions. Comment lines are notshifted.

    STRUCT Perform structural indentation of NATURAL source statementsand identify structural inconsistencies.

    STRUCTDISPLAY

    The NATURAL source program is displayed in compressed form.(See STRUCT system command)

    * Display edit command most recently entered.*= Execute last command entered in command line. Same as

    CANCEL.+P, +, P, Position forwards (+) or backwards () one page.+H, H Position forwards or backward 1/2 page.T, or B, ++ Position to top) or bottom (++) of program.+nnnn, nnnn Position forwards or backward 'nnnn' lines.nnnn Position to line 'nnnn'.X, Y Position to page containing line marked with X or Y.POINT Position line in which .N was entered to top of editor screen

    Some additional less used commands are:

    Command DescriptionSET NUL ON/OFF “ON” causes the value scanned with SCAN to be deleted.

    After deletion the NUL value is “OFF”. (Default)SET RANGE ON/OFF “ON” causes SCAN and CHANGE tooperate only within

    the range of lines delimited by X and Y line markers.Default is “OFF”.

    SET SIZE ON/OFF “ON” causes the program size to be displayed at the bottom of editor screen. Default is “OFF”.

    SET STAY ON/OFF “ON” causes the current screen to remain when theENTER key is pressed. (Forward/backward positioning isthen accomplished with the edit commands only.)“OFF” causes the editor to position to the next screen with each ENTER key. (Default)

  • Page 10

    Editor Line Commands

    The following are line commands used in the program and data area editors.

    Line Command Description.X Indicate beginning of block of lines to be processed..Y Indicate end of block of lines to be processed..C(nn) Copy line in which command is entered..CX(nn) .CY(nn) Copy X marked line or Y marked line..CX -Y(nn) Copy block of lines delimited by X and Y..D(nn) Delete line(s) in which command is entered. Default is 1..I(n) Insert (n) lines. Default (max) = 9, 4 in split screen mode..I(obj,ssss,nnnn) Insert object from current library or library 'SYSTEM' into the

    source. 'ssss' is 1st line to be inserted (i.e. if insertion is to beginwith 39th line, ssss is '39') and 'nnnn' is number of lines to beinserted. This command is always executed after all otheredit/line commands. If a map is inserted, INPUT USING MAP isincluded in current line. If data area (cataloged) is inserted,DEFINE DATA is included in current line.

    .J Join current line with next line.

    .L Cause contents of line to remain unchanged.

    .MX .MY Move X marked or Y marked line.

    .MX-Y Move block of lines delimited by X and Y.

    .N Mark invisibly a line for POINT command.

    .P Position line in which command is entered to top of screen.

    .S Split line at position marked by cursor.

  • Page 11

    Data Area Editor and It's Commands

    ColumnName

    Description

    I Information field supplied by editor (not modifiable by user). Valuesare:

    E definition error has been detectedI initial value has been definedM edit mask has been definedS both initial value and edit mask have been defined.

    T Type indicator. Can be supplied and modified by user if not on a VIEW.Values include:

    B data blockV view:G (group level),M (multiple value field)P (periodic group)C (countervariable - C* variables)R redefinitionC constant (in case of user defined variable)* comment

    L Level number (1-9). Can be entered and modified by user unless part ofVIEW definition. Variables not within hierarchical structure, viewdefinitions must be assigned level 1. Level numbers may not be usedwith block definitions.

    NAME Name of variable, block, or view or filler option (nX) 0 < n < 25F Format (any supported by NATURAL).LENG Length (not permitted for formats C, D, and T).INDEX/... Define array, e.g. (2,2); supply initial value for variable, e.g. INIT;

    supply edit mask for variable, e.g. (EM=999.99).

    Defining Data Area Terms

    FILE - This is the physical repository where the data resides. It is defined andcreated by the DBA.

    DDM - Data Definition Module. This the bridge between NATURAL and theADABAS file. It points to the file location and record layout and is used byNATURAL to communicate to ADABAS what information is needed by the program.This is also created and maintained by the DBA.

  • Page 12

    VIEW - The subset of field definitions from the DDM that NATURAL will use in theprogram. Only the information needed by the program should be in the viewsince that is all that will be returned by NATURAL to the program. Sometimes thisterm is also applied to an object that is created as part of the file definition. It issometimes called a database view. In the Understanding Natural Seminars,anytime we say VIEW we mean a program view created by the programmer forthe program.

    Data Area Commands

    There are a number of commands that are valid in the data area editor. Thesecommands are only issued on the editor command line.

    Data Area Command DescriptionCHECK Check data area definition; causes entries INDEX/INIT...

    to be ordered in sequence shown on edit screen.CLEAR Clear edit source area.CREATE GLOBALS Collect global variables in objects in current library, and

    value* place in global data area 'COMMON'. (value*option restricts processing to objects whose namebegins with 'value'.)

    GEN object-name Generate NATURAL copycode containing DEFINE DATALOCAL statement using definitions currently in sourcework area.

    PROFILE name Read/display/save user specific editor profile.READ data-area Read existing data area definition into edit source area.SAVE data-area Save data area currently in edit source area. (Definition

    is not checked prior to being saved.)SET STAY ON/OFF ON Current screen remains when ENTER used

    (forward/backward positioning with commands). OFFPosition to next screen.

    SET TYPE Set object type to: G (global), L (local), P (parameter).STOW data-area Save and catalog data area definition currently in edit

    source area; definition is checked prior to beingcataloged.

  • Page 13

    Data Area Line Commands

    The following is a list of the Data Area Line commands.

    LineCommands

    Description

    .C Copy line in which command is entered.

    .CX .CY Copy X-marked line or Y-marked line.

    .CX-Y Copy block of lines delimited by X and Y.

    .D Delete line in which command is entered. If part of a hierarchicalstructure, whole part will be deleted.

    .D(nnnn) "nnnn" lines will be deleted.

    .E Invoke separate screen for definition of initial values and editmasks. If entered for a view field, the EM screen is invoked.

    .F(file-name) Includes a PREDICT-file.

    .I Insert lines. Default is 10, 5 in split screen mode.

    .I(obj) Insert obj. If obj is not a data area, you can choose if all variablesand/or parameters are inserted.

    .I(obj,sss,nnnn) Insert obj, if it is a data area. sss defines the line no. where tostart, nnnn defines the number of inserted lines.

    .L Cause contents of line to remain unchanged.

    .MX .MY Move X-marked or Y-marked line.

    .MX-Y Move block of lines delimited by X and Y.

    .N Mark a line for POINT command.

    .P Position line in which command is entered to top of screen.

    .R Redefine an object.

    .V (view-name) Define view; if view- name not given, current view is included.

    .X Indicate beginning of block of lines to be processed.

    .Y Indicate end of block of lines to be processed.

    .* Generate C* (internal count) variable for multiple value field orfield within periodic group number(n,m) . Number offield/group from split screen which is to be inserted; n specifiesthe number of fields to be inserted; m specifies the level whereto be inserted; direction indicator controls insertion location.

  • Page 14

    The Map Editor and It's Commands

    2

    Creating MAPSCreating MAPS

    12:41:56 ***** NATURAL MAP EDITOR ***** 97-04-28User TSRHODE - Edit Map - Library DEVINFO

    Code Function---- ---------------------------------D Field and Variable DefinitionsE Edit MapI Initialize new MapH Initialize a new Help MapM Maintenance of Profiles & DevicesS Save MapT Test MapW Stow Map? Help. Exit

    Code .. I Name .. ________ Profile .. SYSPROF_

    Command ===>Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---

    Help Exit Test Edit

    Unlike the program and data area editors the map editor has it's own menu withoptions specific to the map editor

    Parm DescriptionD Display name, format, mode, position, and number of processing rules

    for each field.E Invoke Map Editor to create/modify a map or help map.I Initialize a map.H Initialize a help map.M Add/modify/delete map, and device profiles.S Save map definition.T Test current map definition (including testing of processing rules and

    help facilities).W Stow (catalog and save) map definition.Code Function (as described above) to be executed.Name Source member which contains map or help map.Profile Map profile currently in effect (library ID, user ID, SYSDBA, or SYSPROF).Library NATURAL library ID currently in effect.

  • Page 15

    Basic Map Settings for Map screen.

    3

    Creating MAPS...Creating MAPS...SettingsSettings12:42:06 Define Map Settings for MAP 97-04-28

    Delimiters Format Context----------------- --------------------------- --------------------------Cls Att CD Del Page Size ...... 23 Device Check .... ________T D BLANK Line Size ...... 79 WRITE Statement _T I ? Column Shift ... 0 (0/1) INPUT Statement XA D _ Layout ......... ________ Help ____________________A I ) dynamic ....... N (Y/N) as field default N (Y/N)A N ª Zero Print ..... N (Y/N)M D & Case Default ... UC (UC/LC)M I : Manual Skip .... N (Y/N) Automatic Rule Rank 1O D + Decimal Char ... . Profile Name .... SYSPROFO I ( Standard Keys .. N (Y/N)

    Justification .. L (L/R) Filler CharactersPrint Mode ..... __ ------------------------

    Optional, Partial ....Control Var .... ________ Required, Partial ....

    Optional, Complete ...Required, Complete ...

    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---Help Exit Let

    This screen gives you the option of changing the parameters the map will use forpresentation and processing.

    Parameter DescriptionDelimiters These are special characters defined with the output parameters

    assigned to them. They will be placed in front of text and data fieldsto control their presentation on the map. The following are defaultsettings. They may be changed or added to as needed.

    Cls (Field Class) CD (Colors)A input field BL blue RE redM output field (modifiable) GR green TU turquoiseO output field (non-modifiable) NE neutral YE yellowT text constant PI pink

    Att (Attributes)B blinking N non-displayC cursive/italic U underlinedD default V reversed-video

  • Page 16

    I intensified Y dynamic (assigned by program)

    Del (delimiter) - This is the special character which will carry theinput / output definition assigned to it.

    Page Size Number of map lines to be edited (1-250);Line Size Number of columns to be edited.Col Shift To use all columns in a map, specify 'Col Shift = 1'.Layout Name of map source definition containing specified layout.dynamic If 'Y', specified layout will only become effective at runtime.Zero Print Y Field value of all zeros displayed with one zero; N Zero value

    displayed as blank.Case Deflt. UC All input converted to upper case at map execution; LC No

    lower to upper case conversion.ManualSkip

    Y Cursor not moved automatically to next field at map execution

    Dec. Char. Character used as decimal notation (can be changed with GLOBALScommand only)

    Std Keys Y Last two lines of map remain empty for entering function keyspecifications at map execution; N All lines are used for map.

  • Page 17

    The Map Editor

    This is the actual map editor. This is where you will "paint" the map or report formwith the fields and test you wish to see.

    5

    Creating MAPSCreating MAPS...Map Editor...Map EditorOb _ Ob D CLS ATT DEL CLS ATT DEL. . T D Blnk T I ?. . A D _ A I ). . A N ª M D &. . M I : O D +. . O I (. .001 --010---+----+----+---030---+----+----+---050---+----+----+---070---+----

    Enter-PF1---PF2---PF3---PF4---PF5---PF6---PF7---PF8---PF9---PF10--PF11--PF12---Help Mset Exit Test Edit -- - + Full < > Let

    Ob L

    Ob P

    Ob V

    Characters for field definitions are:

    "X" Alphanumeric position "9" Numeric position "0" Numeric right justified " . " Decimal notation "S" Sign position (numeric field only) "HH" Hexadecimal (binary)

  • Page 18

    EXAMPLES::999 (3 positions, numeric)+000 (3 positions, numeric right justified):99.9 (3 positions, numeric with decimal point):S9(6) (6 positions, signed numeric):HHHH (4 positions, hexadecimal)&X(7) (7 positions, alphanumeric)

    You may select fields from user view or data definition from any of the followingobject types:

    A Parameter data area L Local data area P Program G Global data area M Map S Subroutine H Helproutine N Subroutine V View

    Map Editor Pfkeys

    There are a number of Pfkeys which will help you navigate inside the map editor.Pfkeys allow quick execution of certain editor, line, and field commands. They alsoprovide some positional commands to control what part of the screen is available,and where. Let's review them.

    Key Command DescriptionPF1 Invoke Map Editor help facility.PF2 Display/modify current map settings.PF3 .Q Return to main menu.PF4 Test map definition.PF5 .E Invoke extended field editing for field at cursor position.PF6 .-- Move screen window to top.PF7 .- Move screen window upward 1/2 page.

    .-nnn Move screen window upward nnn lines.PF8 .+ Move screen window downwards 1/2 page.

    .+nnn Move screen window downward nnn lines.

  • Page 19

    .++ Move screen window to bottom.PF9 ./ Switch between split screen and full screen mode.PF10 .< Move screen window to left 1/2 page.

    .nnn Move screen window to right nnn columns.

    .>> Move screen window to right border.PF12 Ignore changes made on screen subsequent to last use of

    ENTER.* Move screen window to cursor position.

    Map Editor Line Commands

    Line commands are used to affect several fields at one time.

    Command Description..A Array table definition.

    ..An Array table definition with n occurrences (vertical)...C Center a single line. Two '..C' commands on same screen will center

    first line and adjust rest of selected lines...Cn Center line and move n-1 lines below it accordingly...C* Center line and move all lines below it accordingly...D Delete single line. Two '..D' commands on same screen will delete

    block of lines delimited by commands...Dn Delete the line and n-1 lines below it...D* Delete the line and all lines below it (if delete operation affects array

    elements, the array is deleted in total)...E Invoke extended field editing for all fields contained in line. Two '..E'

    commands entered on same screen cause all fields within range oflines delimited by commands to be displayed for editing.

    ..En Invoke extended field editing for the line and n-1 lines below it...E* Invoke extended field editing for the line and all lines below it.

    Map Editor Field Commands

    Several commands apply only to the fields on the map.

    Command Description.A Array definition (applies to single field only and not range). Array

  • Page 20

    positioned with upper left corner at position where command isentered. Array is redefined by applying '.A' to one of its elements.

    .An Define one dimensional array (no spacing, no offsets)..C Center field between adjoining fields. (Enter '.C' in field to be

    centered.) Center range of fields between adjoining fields. (Enter '.C'in first and last field to be centered, or position cursor in last field tobe centered.)

    .D Delete field. (Enter '.D' in field to be deleted.) Delete range of fields.(Enter '.D' in first and last field to be deleted; range may extendbeyond single line.) If array element is deleted, entire array will bedeleted.

    .E Invoke extended editing for field (does not apply to range)..J Join fields located on consecutive lines. Left boundary corresponds

    to where the command is entered; right boundary to cursorposition.

    .M Move field. (Enter '.M' in field to be moved, place cursor at targetposition.) Move range of fields. (Enter '.M' in first and last field to be

    moved, place cursor at target position.)

  • Page 21

    Basic ADABAS Usage

    31

    Basic ADABAS UsageBasic ADABAS Usage

    ADABAS is a DBMS–Databases

    » Files Elementary Fields MU Fields PE Groups Super Descriptors Sub Descriptors

    » Views of Files

    The major components that make up ADABAS are:

    Component DescriptionData Storage The physical location of the records.Work A structure used internally by ADABAS for temporary storage and

    for complex functions.Associator This is actually made up of two parts. The Inverted List and the

    Address Converter rapidly locate records requested by theprogram from data storage.

    Some terms used with ADABAS are:

    Term DescriptionBlock Physical storage is divided into blocks and ADABAS records are

    stored in these blocks. Each block is identified by blocknumber and ISN.

  • Page 22

    ISN Internal Sequence Number of each ADABAS record.AddressConverter

    A table managed by ADABAS which maps each record and it'sISN to the specific block where it can be found.

    Descriptor A field which has been defined as a key. This field will have anassociated index. There are several kinds of descriptors.D = Elementary DescriptorP = Phonetic descriptorS = Sub or Super descriptor. A sub descriptor is made up of apart of a field. A super descriptor is made of multiple fieldsand/or parts of fields.H = Hyper descriptor which is based on code provided by yoursite.N = non descriptor. This is not indexed, but will act like it is.

    Inverted List The index for each descriptor which is managed by ADABAS.Hold Only one person or transaction may update any single ADABAS

    record at one time. When a record is on hold for update,ADABAS will issue and error message or be placed on hold towait until the record is available.

  • Page 23

    Notes -

  • Page 24

    Create Your Own Cheat Sheet

    The following table can be used to create a quick reference to those commandsyou use most.

    Command Description