MACRO 00001000
SYSCOR &RMSIZE=,&SYSNAME=SYSTEM,&SYSACNT=00000000,&FREE=, *00002200
&TRACE=,&AP=NO @V60BCAB 00002300
.* THIS MACRO BUILDS THE SYSTEM VMBLOK, CORTABLE, & REAL MACHINE SIZE 00003000
GBLC &SY$COR @V60BBBC 00003300
&SY$COR SETC 'HERE' ANNOUNCE PRESENCE TO SYSLOCS @V60BBBC 00003600
GBLA &DEC 00004000
GBLB &RCODE 00005000
GBLC &HEX 00006000
LCLA &I,&K,&NUM,&NUMP,&F,&PAGS,&TRC1,&TRC2 @V60BCAB 00007100
LCLC &CS,&RS,&AP1 @V407595 00008100
AIF ('&AP' NE 'NO' AND '&AP' NE 'YES').ERR3 @V407595 00008200
&AP1 SETC '&AP'(1,1) @V407595 00008300
&K SETA K'&RMSIZE 00009000
AIF (&K EQ 0).ERR1 00010000
&CS SETC '&RMSIZE'(&K,1) 00011000
AIF ('&CS' NE 'K' AND '&CS' NE 'M').ERR1 00012000
&I SETA 1 00013000
.LOP1 AIF ('&RMSIZE'(&I,1) LT '0' OR '&RMSIZE'(&I,1) GT '9').ERR1 00014000
&I SETA &I+1 00015000
AIF (&I LE &K-1).LOP1 00016000
&RS SETC '&RMSIZE'(1,&K-1) 00017000
&NUM SETA &RS 00018000
AIF ('&CS' NE 'M').NOADJ 00019000
&NUM SETA &NUM*1024 00020000
.NOADJ AIF (&NUM/2*2 NE &NUM).ERR1 00021000
&NUMP SETA &NUM/4+(&NUM-&NUM/4*4)/2 00022000
AIF (&NUM LT 240 OR &NUM GT 16392).ERR1 00023000
&F SETA &NUM 00023100
&NUM SETA &NUM*1024 00024000
&RS SETC '' 00025000
.LOP2 ANOP 00026000
&DEC SETA &NUM-&NUM/16*16 00027000
DECHEX 00028000
AIF (&RCODE).ERR1 00029000
&RS SETC '&HEX&RS' 00030000
&NUM SETA &NUM/16 00031000
AIF (&NUM GT 0).LOP2 00032000
SPACE 00033000
AIF (K'&FREE EQ 0).NOFP 00033100
&PAGS SETA &FREE 00033200
AIF (&PAGS LT 3 OR &PAGS GT (&F/4)).ERR2 00033300
AGO .SETFP 00033400
.NOFP ANOP 00033500
&PAGS SETA 0 00033600
.SETFP ANOP 00033700
&TRC2 SETA 4 @V60BCAB 00033710
AIF (K'&TRACE EQ 0).NOTRC WAS A TRACE VALUE GIVEN? @V60BCAB 00033720
AIF (&TRACE LT 0 OR &TRACE GT 999).ERR4 00033730
&TRC1 SETA &TRACE YES, SET DMKSYSTR TO GIVEN VALUE @V60BCAB 00033740
&TRC2 SETA &TRC1 SET &TRC2 TO SPECIFIED TRACE VALUE @V60BCAB 00033750
AGO .SETTRC1 BRANCH @V60BCAB 00033760
.NOTRC ANOP @V60BCAB 00033770
&TRC1 SETA 0 NOTRACE VALUE GIVEN. SET DMKSYSTR TO 0 @V60BCAB 00033780
.SETTRC1 ANOP @V60BCAB 00033790
AIF (&PAGS GT 0).SETTRC2 FREE PAGES SPECIFIED? @V60BCAB 00033800
&TRC2 SETA &TRC2+3 NO,ADD MINIMUM OF 3 FREE PAGES TO &TRC2 @V60BCAB 00033810
.SETTRC2 ANOP @V60BCAB 00033820
AIF (&TRC2+&PAGS GT &F/4).ERR4 TRACE+FREE>REAL? @V60BCAB 00033830
ENTRY DMKSYSRM,DMKSYSRV,DMKSYSFP,DMKSYSAP @V407595 00033900
ENTRY DMKSYSTR @V60BCAB 00034000
DMKSYSRM DC XL4'00' 00035000
DMKSYSRV DC XL4'&RS' 00036000
DMKSYSFP DC A(&PAGS) 00036100
DMKSYSAP DC CL1'&AP1' @V407595 00036200
DS CL1 RESERVED @V60BCAB 00036300
DMKSYSTR DC H'&TRC1' NUMBER OF PAGES FOR TRACE TABLE @V60BCAB 00036400
SPACE 00037000
ENTRY DMKSYSVM 00038000
DMKSYSVM VMBLK VMUSER=&SYSNAME,VMACNT=&SYSACNT,VMNEXT=DMKSYSOP, *00039000
VMSIZE=80000,VMRSTAT=VMNORUN 00040000
ENTRY DMKSYSCS 00041000
DMKSYSCS DS 0D SYSTEM CORTABLE 00042000
DC &NUMP.XL16'00' 00043000
SPACE 3 00044000
MEXIT 00045000
.ERR1 MNOTE 8,'INVALID RMSIZE SPECIFIED' 00046000
MEXIT 00046100
.ERR2 MNOTE 8,'INVALID FREE SPECIFIED' 00046200
MEXIT @V407595 00046300
.ERR3 MNOTE 8,'INVALID AP= VALUE SPECIFIED' @V407595 00046400
.ERR4 MNOTE 8,'INVALID TRACE= VALUE SPECIFIED' @V60BCAB 00046500
MEXIT @V60BCAB 00046520
MEND 00047000