IBM Version 4 Establish addressability to the Crts template, Instruction stream, create the space

Models: Version 4

1 505
Download 505 pages 30.92 Kb
Page 159
Image 159

2.Have MICRTPG2 create an automatically extendable space (it can a ically increase to as many as 16MB in size) using the Create Spac instruction. Because the CRTS instruction requires a definition templa need to define it Machine(see theInterface Functional Reforerencedetails).

The following template creates a space (type and'19EFsubtype') equal that is defined through the OBJCRTOPT .1/data.Theelementspace is

defined as temporary (the next initial program load (IPL) will fre occupied by the space), extendable up to as many as 16MB, and context (a library).

DCL DD CRTSTMPLT CHAR(16ð) BDRY(16);

DCL DD TMPLTSPEC CHAR(8) DEF(CRTSTMPLT) POS(1);

DCL DD TMPLTSIZE BIN(4) DEF(TMPLTSPEC) POS(1) INIT(16ð); DCL DD TMPLTBA BIN(4) DEF(TMPLTSPEC) POS(5) INIT(ð); DCL DD OBJID CHAR(32) DEF(CRTSTMPLT) POS(9);

DCL DD SPCTYPE CHAR(1) DEF(OBJID) POS(1) INIT(X'19'); DCL DD SPCSUBTYPE CHAR(1) DEF(OBJID) POS(2) INIT(X'EF'); DCL DD SPCNAME CHAR(3ð) DEF(OBJID) POS(3) INIT(" ");

DCL DD OBJCRTOPT CHAR(4) DEF(CRTSTMPLT) POS(41) INIT(X'6ðð2ðð￿ðð');.1/ DCL DD OBJRCVOPTS CHAR(4) DEF(CRTSTMPLT) POS(45);

DCL DD \ CHAR(2) DEF(OBJRCVOPTS) POS(1) INIT(X'ðððð'); DCL DD ASP CHAR(2) DEF(OBJRCVOPTS) POS(3) INIT(X'ðððð'); DCL DD SPCSIZ BIN(4) DEF(CRTSTMPLT) POS(49) INIT(1);

DCL DD INTSPCVAL CHAR(1) DEF(CRTSTMPLT) POS(53) INIT(X'ðð');

DCL DD PERFCLASS CHAR(4) DEF(CRTSTMPLT) POS(54) INIT(X'ðððððð￿ðð'); DCL DD \ CHAR(1) DEF(CRTSTMPLT) POS(58) INIT(X'ðð');

DCL DD PUBAUT CHAR(2) DEF(CRTSTMPLT) POS(59) INIT(X'ðððð'); DCL DD TMPLTEXTN BIN(4) DEF(CRTSTMPLT) POS(61) INIT(96);

DCL SYSPTR CONTEXT DEF(CRTSTMPLT) POS(65); DCL SYSPTR ACCESSGRP DEF(CRTSTMPLT) POS(81); DCL SYSPTR USRPRF DEF(CRTSTMPLT) POS(97);

DCL DD MAXSPCSIZ BIN(4) DEF(CRTSTMPLT) POS(113) INIT(ð); DCL DD DOMAIN CHAR(2) DEF(CRTSTMPLT) POS(117) INIT(X'ððð1'); DCL DD \ CHAR(42) DEF(CRTSTMPLT) POS(119) INIT((42)X'ðð');

3. Establish addressability to the CRTS template:

DCL SPCPTR CRTSTMPLT@ INIT(CRTSTMPLT);

4. Because the space is defined to be in a context, supply the context in the previous CRTS template. This program uses the QTEMP co that is identified by the following:

DCL SYSPTR QTEMP@ BASPCO POS(65);

Use the copy bytes with pointers instruction (CPYBWP) to set the context data element.

CPYBWP CONTEXT, QTEMP@;

5. In the instruction stream, create the space:

CRTS USRSPC@, CRTSTMPLT@;

This returns a system pointer to the created space in the syste

DCL

SYSPTR USRSPC@;

 

 

 

 

 

6. Declare a space

pointer for addressability

to

the

space throug

(as opposed to

the system pointer

returned

by

the

CRTS instructi

DCL

SPCPTR USRSPC;

 

 

 

 

 

 

 

Chapter 7.

Machine Interface

Programming7-19

Page 159
Image 159
IBM Version 4 manual Establish addressability to the Crts template, Instruction stream, create the space