Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Generating SAM/ISAM files

EDT is used to create a SAM file. This file is added as a member and stored in the form of two different types of file:

  • as a SAM file, on the basis of the file attributes stored in the member

  • as an ISAM file using ISAM keys created by default.

/start-lms ---------------------------------------------------------------  (1) 

//modify-logging-parameters logging=*maximum -----------------------------  (2)

//open-library library=bsp6.bib,mode=*update -----------------------------  (3)

LIBRARY IS CLEARED AND PREPARED

//modify-lms-defaults type=d ---------------------------------------------  (4)

(1)

LMS is called.

(2)

In addition to error messages, positive acknowledgments are also logged.

(3)

Library BSP6.BIB is opened.

(4)

The default value for the member type will be set.

//call-edt -----------------------------------------------------------------  (5)

//modify-lms-defaults (source-attributes=*keep) -------------------------   (6)

//add-element from-file=pers.dat, to-elem=(,perdat) ---------------------   (7)

INPUT  FILE
OUTPUT LIBRARY= :1OSN:$USER.BSP6.BIB

        ADD :1OSN:$USER.PERS.DAT AS (D)PERDAT/@(0001)/2013-03-01

(5)

EDT is called in order to generate or process a file.

Subsequently the data is entered and stored as SAM file PERS.DAT by means of WRITE. HALT terminates EDT and returns control to LMS.

(6)

The file attributes of the EDT file are retained.

(7)

File PERS.DAT added to the library as a D-type member having the name PERDAT.

//show-element-attributes (type=d)

INPUT  LIBRARY= :1OSN:$USER.BSP6.BIB
TYP NAME   VER (VAR#) DATE
(D) PERDAT @   (0001) 2013-03-01
      1 (D)-ELEMENT(S) IN THIS TABLE OF CONTENTS

//extract-element (element=perdat) --------------------------------------   (8) 

INPUT  LIBRARY= :1OSN:$USER.BSP6.BIB
OUTPUT FILE

        EXTRACT (D)PERDAT/@(0001)/2013-03-01 AS :1OSN:$USER.PERDAT

//exec-sys-cmd (show-file-attributes perdat,information=*all-attr) ------   (9)

00000003 :1OSN:$USER.PERDAT
  ------------------------------- HISTORY      -------------------------------
  CRE-DATE   = 2013-03-01  ACC-DATE   = 2013-03-01  CHANG-DATE = 2013-03-01
  CRE-TIME   =   10:32:56  ACC-TIME   =   10:32:56  CHANG-TIME =   10:32:56
  ACC-COUNT  = 1           S-ALLO-NUM = 0
  ------------------------------- SECURITY     -------------------------------
  READ-PASS  = NONE        WRITE-PASS = NONE        EXEC-PASS  = NONE
  USER-ACC   = OWNER-ONLY  ACCESS     = WRITE       ACL        = NO
  AUDIT      = NONE        FREE-DEL-D = *NONE       EXPIR-DATE = 2013-03-01
  DESTROY    = NO          FREE-DEL-T = *NONE       EXPIR-TIME =   00:00:00
  SP-REL-LOCK= NO          ENCRYPTION = *NONE
  ------------------------------- BACKUP       -------------------------------
  BACK-CLASS = A           SAVED-PAG  = COMPL-FILE  VERSION    = 1
  MIGRATE    = ALLOWED
  ------------------------------- ORGANIZATION -------------------------------
  FILE-STRUC = SAM         BUF-LEN    = STD(1)      BLK-CONTR  = PAMKEY
  IO(USAGE)  = READ-WRITE  IO(PERF)   = STD         DISK-WRITE = IMMEDIATE
  REC-FORM   = (V,N)       REC-SIZE   = 0 
  AVAIL      = *STD
  WORK-FILE  = *NO         F-PREFORM  = *K          S0-MIGR    = *ALLOWED
  ------------------------------- ALLOCATION   -------------------------------
  SUPPORT    = PUB         S-ALLOC    = 34           HIGH-US-PA = 1
  EXTENTS     VOLUME     DEVICE-TYPE      EXTENTS     VOLUME     DEVICE-TYPE
     1       1OSN.2       D34211-2
  NUM-OF-EXT = 1
:1OSN: PUBLIC:      1 FILE  RES=        3  FREE=        2  REL=        0 PAGES 

(8)

The directory of library BSP6.BIB for member type D is to be listed.

(9)

Member PERDAT is output as file PERDAT. Since no file attributes have been specified for this file, LMS generates a SAM file in accordance with the file attributes stored.

(10)

(The file attributes of the generated file are listed.

//extract-element (element=perdat), to-file=persdat, -
// file-attributes=*parameters(access-method=*isam)

INPUT  LIBRARY= :1OSN:$USER.BSP6.BIB
OUTPUT FILE

        EXTRACT (D)PERDAT/@(0001)/2013-03-01 AS :1OSN:$USER.PERSDAT

//exec-sys-cmd (show-file-attributes persdat,information=all) ------------- (10) 

00000003 :1OSN:$USER.PERSDAT

  ------------------------------- HISTORY     -------------------------------
  CRE-DATE   = 2013-03-01  ACC-DATE   = 2013-03-01  CHANG-DATE = 2013-03-01
  CRE-TIME   =   10:32:56  ACC-TIME   =   10:32:56  CHANG-TIME =   10:32:56
  ACC-COUNT  = 1          S-ALLO-NUM = 0
  ------------------------------- SECURITY    -------------------------------
  READ-PASS  = NONE       WRITE-PASS = NONE       EXEC-PASS  = NONE
  USER-ACC   = OWNER-ONLY  ACCESS    = WRITE      ACL       = NO
  AUDIT     = NONE       FREE-DEL-D = *NONE      EXPIR-DATE = 2013-03-01
  DESTROY    = NO         FREE-DEL-T = *NONE      EXPIR-TIME =   00:00:00
  SP-REL-LOCK= NO         ENCRYPTION = *NONE
  ------------------------------- BACKUP      -------------------------------
  BACK-CLASS = A          SAVED-PAG  = COMPL-FILE  VERSION    = 1
  MIGRATE    = ALLOWED
  ------------------------------- ORGANIZATION -------------------------------
  FILE-STRUC = ISAM       BUF-LEN    = STD(1)     BLK-CONTR  = PAMKEY
  IO(USAGE)  = READ-WRITE  IO(PERF)   = STD        DISK-WRITE = IMMEDIATE
  REC-FORM   = (V,N)      REC-SIZE   = 0
  KEY-LEN    = 8          KEY-POS    = 5
  AVAIL     = *STD
  WORK-FILE  = *NO        F-PREFORM  = *K         S0-MIGR    = *ALLOWED
  ------------------------------- ALLOCATION   -------------------------------
  SUPPORT    = PUB        S-ALLOC    = 9          HIGH-US-PA = 3
  EXTENTS    VOLUME    DEVICE-TYPE     EXTENTS    VOLUME    DEVICE-TYPE
     1      1OSN.1      D34211-2
  NUM-OF-EXT = 1
:1OSN: PUBLIC:     1 FILE  RES=       3  FREE=       1  REL=       0 PAGES

//end --------------------------------------------------------------------  (11) 

(11)

Member PERDAT is created as a file having the name PERSDAT. The ACCESS-METHOD operand is then used to specify that the file PERSDAT is an ISAM file.

(12)

The file attributes of the generated file are listed.

(13)

LMS is terminated.