In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Set_Attach_Sub and Attach Images

With the advent of 3.0, the pioneering work from Steve Thomas (with the saving and restoring of attach images to permit rapid logon), was incorporated in the main product. The new Verb SETATTACH permitted developers to take a snapshot of the system and store it in the SYSENV table with a row id of SnapshotName*Account.

The syntax of the command is simply

     SETATTACH AttachImageName RebuildVocItem

where AttachImageName is the name of the attach image to create (minus the *Account) and RebuildVocItem is the name of a VOC entry which will be run if the attach image has changed since last logon.

Such a voc entry might be something like this example, (called in this case, RedoImage)

     TCL
     ATTACH IQRA\PROGS
     ATTACH IQRA\DATA
     SETATTACH IMAGENAME REDOIMAGE (O)

So when the system attaches the image it will compare the checksum on file to a newly generated checksum and if the two differ it will invoke the TCL batch command.

William Earl asked recently on Compuserve "What is the structure of the attach image created by Set_Attach_Sub (as documented in the R/Basic reference manual of Version 3.0)?". William wanted to be able to generate the image himself on the fly so that MFSs etc. could be added and removed easily.

As previously mentioned, the attach image is stored in the SysEnv table as ImageName*Account, where Account is the current account name. Within the row, the first 8 fields are clearly defined, the rest of the fields up to field 19 are blank and field 20 onwards has the structure of multiple repeating fields dependent upon the tables attached. The structure is as follows

     < 1 >     Always seems to contain the literal ATTACH_IMAGE.

     < 2 >     The name of the VOC entry to be used to
               rebuild the image if the system detects a change in the
               media maps since the image was last built.

     < 3 >     A multivalued list of the BFSs used by this attached image.

     < 4 >     A multivalued list of the volume names used by this attached
               image.

     < 5 >     A multivalued list corresponding to < 4 > of the BFSs used by
               the volumes.

     < 6 >     A multivalued list corresponding to < 4 > of the DOS file
               locations of the volumes.

     < 7 >     A multivalued list corresponding to < 4 > of the Control file
               locations of the volumes.

     < 8 >     A multivalued list corresponding to < 4 > which contains the
               checksum indicator used to see whether the image has changed
               since last build and thus needs rebuilding.

               This number seems to be in some way related to the REVMEDIA
               files and is thus not generated for non linear  hash filing
               systems. A potential application for the Omniscript stub in
               BFSs perhaps?

 < 9 - 19>     Unused.

< 20 et seq>   Section 1 - Field mark delimited set of table names attached
               terminated with Char(0). Note that these are the names by
               which the tables are known in this account, ie if they are
               aliased these are the alias names not the original names.

               Section 2 - Field mark delimited set of volumes, tables in
               Section 1 are on. Terminated with Char(0).

               Section 3 - Field mark delimited set of original table names
               attached terminated with Char(0). Note that this differs from
               section 1 in that it is the original names not the aliased
               names.

               Section 4 - Field mark delimited set of accounts that the
               tables in Section 1 reside in. Terminated with a Char(0).

               Section 5 - Field mark delimited set of Mfs/Bfs chains
               attached to each table in Station 1. Terminated with a
               Char(0).

               Section 6 - Field mark delimited set of Volumes attached.
               Terminated with two Char(0)s.

               Section 7  - Field mark delimited set of Dos paths for the
               Volumes in Section 6 - if appropriate. Terminated with a
               Char(0).

               Section 8 - Field mark delimited set of tables on the Volumes
               in Section 6. The individual tables are value mark delimited.
               Terminated with a Char(0).

               Section 9 - Field mark delimited set of BFSs associated with
               the Volumes in Section 6.
(Volume 4, Issue 10, Pages 9,10)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel