Your Browser is not longer supported

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

{{viewport.spaceProperty.prod}}

ADD-ISAM-POOL-LINK

&pagelevel(3)&pagelevel

Assign pool link name to ISAM pool

Component:

BS2000

Functional area:

File processing

Domain:

FILE

Privileges:

STD-PROCESSING

Function

The ADD-ISAM-POOL-LINK command is used to assign a pool link name to an ISAM pool for a user job and to enter this name in the task-local pool table. The job must already be linked to the specified ISAM pool (see the CREATE-ISAM-POOL command). With this pool link name, a connection can then be established via the TFT to a file, using the ADD-FILE-LINK command (with the operands LINK-NAME and POOL-LINK). The link name must be unique within a task. The user can have entries of the task-local pool table displayed by using the SHOW-ISAM-POOL-LINK command. Pool link names can be deleted from the pool table with the REMOVE-ISAM-POOL-LINK command.

For a full description of the ISAM pool see the “Introductory Guide to DMS” [13] or the “DMS Macros” manual [12].

Format

ADD-ISAM-POOL-LINK                                                                                                                              

LINK-NAME = <name 1..8>

,POOL-NAME = <name 1..8>(...)


<name 1..8>(...)



|

CAT-ID = *DEFAULT-PUBSET / <cat-id 1..4>



|

,SCOPE = *TASK / *HOST-SYSTEM / *USER-ID / *USER-GROUP

Operands

LINK-NAME = <name 1..8>
Link name by which the ISAM pool can be addressed (see the POOL-NAME operand). The link name must be unique within a task.

POOL-NAME = <name 1..8>(...)
Name of the ISAM pool to which the pool link name is to be assigned (see the LINK-NAME operand). The ISAM pool is uniquely identified by the specified name, the catalog ID (see the CAT-ID operand) and the scope (see the SCOPE operand). The job must already be linked to the ISAM pool (see the CREATE-ISAM-POOL or SHOW-ISAM-POOL-ATTRIBUTES command).

CAT-ID = *DEFAULT-PUBSET / <alphanum-name 1..4>
Catalog ID of the pubset to which the ISAM pool is assigned.
The specified catalog ID must match the specification in the corresponding CREATE-ISAM-POOL command. 

CAT-ID = *DEFAULT-PUBSET
The ISAM pool is assigned to the catalog that was set with the ISPLDEFC system parameter (ISAM-POOL-DEFAULT-CATID):

X'00':

default catalog ID from the user entry (see the SHOW-USER-ATTRIBUTES command, output field DEFAULT-PUBSET)

X'01':

catalog ID of the home pubset

CAT-ID = <alphanum-name 1..4>
Catalog ID of the pubset to which the ISAM pool is assigned.

SCOPE = *TASK / *HOST-SYSTEM / *USER-ID / *USER-GROUP 
Specifies the scope of the ISAM pool.
The defined scope must match the specification in the corresponding CREATE-ISAM-POOL command.

SCOPE = *TASK
The pool link name is assigned to the task-local ISAM pool, i.e. the ISAM pool can only be used by its own task.

SCOPE = *HOST-SYSTEM
The pool link name is assigned to the cross-task ISAM pool (POOL-NAME operand), i.e. the ISAM pool can be used by all tasks.

SCOPE = *USER-ID / *USER-GROUP
These scopes are only supported for reasons of compatibility (see the CREATE-ISAM-POOL command).

Return codes

(SC2)

SC1

Maincode

Meaning


0

CMD0001

Command executed without error


32

DMS0A17

Internal system error


64

DMS0A0E

Syntax error in ISAM pool command


64

DMS0A11

Specified catalog ID does not exist


64

DMS0A13

Specified pool name is syntactically invalid


64

DMS0A16

Pool link name already allocated


64

DMS0A19

Specified ISAM pool does not exist


64

DMS0A20

Parameters not permitted for remote BS2000 version


64

DMS0A22

User group not present


130

DMS0A12

Specified catalog ID not available

Examples

Use of an ISAM pool to process files

/show-isam-pool-attr pool=*all   —————————————————————————————————  (1)

%
%  CATID    POOLNAME  SCOPE            WROUT   SIZE  EXTENTS  RESIDENT
%=====================================================================
%  1OSU     SDFPOOLN  TASK              NO      128   --/--      NO
%  1OSN     POOLAB01  HOST              YES      96   --/--      NO
%  1OSN     POOLAB01  TASK              NO       96   --/--      NO
%

/add-isam-pool-link link=pool1,pool-name=poolab01(scope=*host)  ————  (2)
/show-isam-pool-link pool-name=*all   ——————————————————————————————  (3)

%
%     LINKNAME          CATID     POOLNAME       SCOPE
%=====================================================================
%     SDFPOOLN          1OSU      SDFPOOLN       TASK
%     POOL1             1OSN      POOLAB01       HOST
%

/show-file-attr abk.v100.isam,inf=(org=*yes)   ——————————————————————  (4)

%0000000126 :1OSN:$USER1.ABK.V100.ISAM 
%  ------------------------------- 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    = 30          KEY-POS    = 8
%  AVAIL      = *STD
%  WORK-FILE  = *NO         F-PREFORM  = *K          S0-MIGR    = *ALLOWED
%:1OSN: PUBLIC:      1 FILE  RES=       126 FRE=         5 REL=         3 PAGES

/add-file-link link=input1,file-name=abk.v100.isam,acc-method=*isam,
              isam-attr=(key-pos=*by-cat,key-len=*by-cat,pool-link=pool1),
              rec-form=*by-cat,buf-len=*by-cat,block-contr=*by-cat  ————  (5)

/show-file-link inf=(file-contr=*yes)   ————————————————————————————————  (6)

%-- LINK-NAME --------- FILE-NAME ---------------------------------------------
%   INPUT1              :1OSN:$USERXY01.ABK.V100.ISAM
%  -------------------- FILE-CONTROL-BLOCK - GENERAL ATTRIBUTES -------------
%  ACC-METH   = ISAM        OPEN-MODE  = *BY-PROG    REC-FORM   = *BY-CAT
%  REC-SIZE   = *BY-PROG    BUF-LEN    = *BY-CAT     BLK-CONTR  = *BY-CAT
%  F-CL-MSG   = STD         CLOSE-MODE = *BY-PROG
%  -------------------- FILE-CONTROL-BLOCK - DISK FILE ATTRIBUTES -----------
%  SHARED-UPD = *BY-PROG    WR-CHECK   = *BY-PROG    IO(PERF)   = *BY-PROG
%  IO(USAGE)  = *BY-PROG    LOCK-ENV   = *BY-PROG
%  -------------------- FILE-CONTROL-BLOCK - TAPE FILE ATTRIBUTES -----------
%  LABEL      = *BY-PROG   (DIN-R-NUM  = *BY-PROG,   TAPE-MARK  = *BY-PROG)
%  CODE       = *BY-PROG    EBCDIC-TR  = *BY-PROG    F-SEQ      = *BY-PROG
%  CP-AT-BLIM = *BY-PROG    CP-AT-FEOV = *BY-PROG    BLOCK-LIM  = *BY-PROG
%  REST-USAGE = *BY-PROG    BLOCK-OFF  = *BY-PROG    TAPE-WRITE = *BY-PROG
%  STREAM     = *BY-PROG
%  -------------------- FILE-CONTROL-BLOCK - ISAM FILE ATTRIBUTES -----------
%  KEY-POS    = *BY-CAT     KEY-LEN    = *BY-CAT     POOL-LINK  = POOL1
%  LOGIC-FLAG = *BY-PROG    VAL-FLAG   = *BY-PROG    PROPA-VAL  = *BY-PROG
%  DUP-KEY    = *BY-PROG    PAD-FACT   = *BY-PROG    READ-I-ADV = *BY-PROG
%  WR-IMMED   = *BY-PROG    POOL-SIZE  = *BY-PROG

/start-exe from=*lib-elem(lib=ass.plamlib,elem=neuwort3)   ————————  (7)

%  BLS0517 MODULE 'NEUWORT3' LOADED
***  PRGLAUF OK! ***

/del-isam-pool pool=poolab01(scope=*task)   ——————————————————————  (8)
/del-isam-pool pool=poolab01(scope=*host)   ——————————————————————  (9)

%  DMS0A1A POOL LINKS TO SPECIFIED POOL STILL EXIST. COMMAND NOT PROCESSED

/show-isam-pool-attr pool=*all   —————————————————————————————————  (10)

%
%  CATID    POOLNAME  SCOPE            WROUT   SIZE  EXTENTS  RESIDENT
%=====================================================================
%  1OSU     SDFPOOLN  TASK              NO      128   --/--      NO
%  1OSN     POOLAB01  HOST              YES      96   2K/--      NO
%

/rem-isam-pool-link link=pool1   —————————————————————————————————  (11) 
/show-isam-pool-link pool-link=pool1   ———————————————————————————  (12)

%  DMS0A60 SPECIFIED ISAM-POOL-LINK-NAME DOES NOT EXIST. COMMAND REJECTED

/del-isam-pool pool=poolab01(scope=*host)   ——————————————————————  (13)

/show-isam-pool-attr pool=*all   —————————————————————————————————  (14)

%
%  CATID    POOLNAME  SCOPE            WROUT   SIZE  EXTENTS  RESIDENT
%=====================================================================
%  1OSU     SDFPOOLN  TASK              NO      128   --/--      NO
%

(1)

Returns information on all ISAM pools connected to the task. There is one ISAM pool named SDFPOOLN, and one host-specific and one task-local ISAM pool with the name POOLAB01. It is evident that no file has been processed via these ISAM pools as yet, since the output column EXTENTS does not contain any formatting information.

(2)

Creates an entry in the task-local pool table. The pool link name POOL1 is assigned to the host-specific ISAM pool POOLAB01.

(3)

Returns information on all pool link names.

(4)

Catalog information on the organization of the NK-ISAM file ABK.V100.ISAM.

(5)

Creates a TFT entry with the link name INPUT1 for the file ABK.V100.ISAM. At the same time, it also links the file with the pool link name POOL1 (in the POOL-LINK operand).

(6)

Output of the TFT entry for the file ABK.V100.ISAM along with general information on file processing (FILE-CONTROL-BLOCK=*YES).

(7)

The program NEWWORD3 is started from the library ASS.PLAMLIB. This program processes individual records of an ISAM file via an ISAM pool. The name of the file to be processed is obtained from the TFT entry with the link name INPUT1. After running successfully, the program terminates and writes the message *** PRGRUN OK! *** to SYSOUT.

(8)

The task-local ISAM pool POOLAB01 is deleted.

(9)

The host-specific ISAM pool POOLAB01 is to be deleted. The DELETE-ISAM-POOL command is rejected since there is still an entry in the task-local pool table for this pool (see step 10).

(10)

Returns information on all ISAM pools connected to the task. It is now evident that at least one NK2-ISAM file (here ABK.V100.ISAM) has been processed via the host-specific ISAM pool POOLAB01, since the ISAM pool is now formatted with 2K (see the EXTENTS column and step 1).

(11)

The entry with the pool link name POOL1 is deleted.

(12)

There is now no longer entry with the pool link name POOL1.

(13)

A new attempt is made to delete the host-specific ISAM pool POOLAB01.

(14)

The host-specific ISAM pool POOLABO1 could be deleted. The task is now only connected to the task-local ISAM pool SDFPOOLN.