ZOSFGUX ;SFISC/MVB,PUG/TOAD - ZOSF Table for GT.M for Unix ;4/18/07 10:30
;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18
;; for GT.M for Unix, version 4.3
;
S %Y=1,DTIME=$G(DTIME,600)
K ^%ZOSF("MASTER"),^%ZOSF("SIGNOFF")
I '$D(^%ZOSF("VOL")) S ^%ZOSF("VOL")="ROU"
K ZO F I="MGR","PROD","VOL","TMP" S:$D(^%ZOSF(I)) ZO(I)=^%ZOSF(I)
F I=1:2 S Z=$P($T(Z+I),";;",2) Q:Z="" S X=$P($T(Z+1+I),";;",2,99) S:Z="OS" $P(^%ZOSF(Z),"^")=X I Z'="OS" S ^%ZOSF(Z)=$S($D(ZO(Z)):ZO(Z),1:X)
;
OS S ^%ZOSF("OS")="GT.M (Unix)^19"
;
MGR W !,"NAME OF MANAGER'S UCI,VOLUME SET: "_^%ZOSF("MGR")_"// " R X:DTIME I X]"" X ^("UCICHECK") G MGR:0[Y S ^%ZOSF("MGR")=X
PROD ;
W !,"The value of PRODUCTION will be used in the GETENV api."
W !,"PRODUCTION (SIGN-ON) UCI,VOLUME SET: "_^%ZOSF("PROD")_"// " R X:DTIME I X]"" X ^("UCICHECK") G PROD:0[Y S ^%ZOSF("PROD")=X
;See that VOL and PROD agree.
I ^%ZOSF("PROD")'[^%ZOSF("VOL") S ^%ZOSF("VOL")=$P(^%ZOSF("PROD"),",",2)
VOL W !,"The VOLUME name must match the one in PRODUCTION."
W !,"NAME OF VOLUME SET: "_^%ZOSF("VOL")_"//" R X:DTIME
I X]"" D I X'?3U W "MUST BE 3 Upper case." G VOL
. I ^%ZOSF("PROD")'[X W !,"Must match PRODUCTION"
. S:X?3U ^%ZOSF("VOL")=X
TMP ;Get the temp directory
W !,"The temp directory for the system: '"_^%ZOSF("TMP")_"'//"
R X:DTIME I $L(X),X'?1"/".E G TMP
I $L(X) S ^%ZOSF("TMP")=X
W !,"^%ZOSF setup"
Q
;
Z ;
;;ACTJ
;;S Y=$$ACTJ^%ZOSV()
;;AVJ
;;S Y=$$AVJ^%ZOSV()
;;BRK
;;U $I:(CENABLE)
;;DEL
;;D DEL^%ZOSV2(X) ;N %RD,%OD S %RD=$P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/",%OD=$S($ZRO["(":$P($ZRO,"(",1)_"/",1:%RD) ZSYSTEM "rm -f "_%RD_X_".m" ZSYSTEM "rm -f "_%OD_X_".o"
;;EOFF
;;U $I:(NOECHO)
;;EON
;;U $I:(ECHO)
;;EOT
;;S Y=$ZA\1024#2 ; <=====
;;ERRTN
;;^%ZTER
;;ETRP
;;Q
;;GD
;;G ^%GD
;;$INC
;;0
;;JOBPARAM
;;G JOBPAR^%ZOSV
;;LABOFF
;;U IO:(NOECHO) ; <=====
;;LOAD
;;D LOAD^%ZOSV2(X) ;S %N=0 F XCNP=XCNP+1:1 S %N=%N+1,%=$T(+%N^@X) Q:$L(%)=0 S @(DIF_XCNP_",0)")=%
;;LPC
;;S Y="" ; <=====
;;MAGTAPE
;;S %MT("BS")="*1",%MT("FS")="*2",%MT("WTM")="*3",%MT("WB")="*4",%MT("REW")="*5",%MT("RB")="*6",%MT("REL")="*7",%MT("WHL")="*8",%MT("WEL")="*9" ; <=====
;;MAXSIZ
;;Q
;;MGR
;;VAH,ROU
;;MTBOT
;;S Y=$ZA\32#2 ; <=====
;;MTERR
;;S Y=$ZA\32768#2 ; <=====
;;MTONLINE
;;S Y=$ZA\64#2 ; <=====
;;MTWPROT
;;S Y=$ZA\4#2 ; <=====
;;NBRK
;;U $I:(NOCENABLE)
;;NO-PASSALL
;;U $I:(ESCAPE:TERMINATOR="":NOPASTHRU)
;;NO-TYPE-AHEAD
;;U $I:(NOTYPEAHEAD)
;;PASSALL
;;U $I:(NOESCAPE:NOTERMINATOR:PASTHRU)
;;PRIINQ
;;S Y=$$PRIINQ^%ZOSV()
;;PRIORITY
;;Q ;G PRIORITY^%ZOSV
;;PROD
;;VAH,ROU
;;PROGMODE
;;S Y=$$PROGMODE^%ZOSV()
;;RD
;;G ^%RD
;;RESJOB
;;Q:'$D(DUZ) Q:'$D(^XUSEC("XUMGR",+DUZ)) N XQZ S XQZ="^FORCEX[MGR]" D DO^%XUCI ; <=====
;;RM
;;U $I:WIDTH=$S(X<256:X,1:0)
;;RSEL
;;K ^UTILITY($J) D ^%RSEL S X="" X "F S X=$O(%ZR(X)) Q:X="""" S ^UTILITY($J,X)=""""" K %ZR
;;RSUM
;;S Y=0 F %=1,3:1 S %1=$T(+%^@X),%3=$F(%1," ") Q:'%3 S %3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*%2+Y
;;RSUM1
;;N %,%1,%2,%3 S Y=0 F %=1,3:1 S %1=$T(+%^@X),%3=$F(%1," ") Q:'%3 S %3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*(%2+%)+Y
;;SS
;;D ^ZSY
;;SAVE
;;D SAVE^%ZOSV2(X) ;N %I,%F S %I=$I,%F=$P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/"_X_".m" O %F:(NEWVERSION) U %F X "F S XCN=$O(@(DIE_XCN_"")"")) Q:+XCN'=XCN S %=@(DIE_XCN_"",0)"") Q:$E(%,1)=""$"" I $E(%)'="";"" W %,!" C %F U %I
;;SIZE
;;S Y=0 F I=1:1 S %=$T(+I) Q:%="" S Y=Y+$L(%)+2 ; <=====
;;TEST
;;I X]"",$T(^@X)]""
;;TMK
;;S Y=$ZA\16384#2
;;TMP
;;/tmp/
;;TRAP
;;$ZT="G "_X
;;TRMOFF
;;U $I:(TERMINATOR="")
;;TRMON
;;U $I:(TERMINATOR=$C(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127))
;;TRMRD
;;S Y=$A($ZB)
;;TYPE-AHEAD
;;U $I:(TYPEAHEAD)
;;UCI
;;S Y=^%ZOSF("PROD")
;;UCICHECK
;;S Y=1
;;UPPERCASE
;;S Y=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
;;XY
;;S $X=DX,$Y=DY ; <=====
;;VOL
;;ROU
;;ZD
;;S Y=$$HTE^XLFDT(X,2) I $L($P(Y,"/"))=1 S Y=0_Y
ZOSFGUX ;SFISC/MVB,PUG/TOAD - ZOSF Table for GT.M for Unix ;4/18/07 10:30
+1 ;;8.0;KERNEL;**275,425**;Jul 10, 1995;Build 18
+2 ;; for GT.M for Unix, version 4.3
+3 ;
+4 SET %Y=1
SET DTIME=$GET(DTIME,600)
+5 KILL ^%ZOSF("MASTER"),^%ZOSF("SIGNOFF")
+6 IF '$DATA(^%ZOSF("VOL"))
SET ^%ZOSF("VOL")="ROU"
+7 KILL ZO
FOR I="MGR","PROD","VOL","TMP"
IF $DATA(^%ZOSF(I))
SET ZO(I)=^%ZOSF(I)
+8 FOR I=1:2
SET Z=$PIECE($TEXT(Z+I),";;",2)
IF Z=""
QUIT
SET X=$PIECE($TEXT(Z+1+I),";;",2,99)
IF Z="OS"
SET $PIECE(^%ZOSF(Z),"^")=X
IF Z'="OS"
SET ^%ZOSF(Z)=$SELECT($DATA(ZO(Z)):ZO(Z),1:X)
+9 ;
OS SET ^%ZOSF("OS")="GT.M (Unix)^19"
+1 ;
MGR WRITE !,"NAME OF MANAGER'S UCI,VOLUME SET: "_^%ZOSF("MGR")_"// "
READ X:DTIME
IF X]""
XECUTE ^("UCICHECK")
IF 0[Y
GOTO MGR
SET ^%ZOSF("MGR")=X
PROD ;
+1 WRITE !,"The value of PRODUCTION will be used in the GETENV api."
+2 WRITE !,"PRODUCTION (SIGN-ON) UCI,VOLUME SET: "_^%ZOSF("PROD")_"// "
READ X:DTIME
IF X]""
XECUTE ^("UCICHECK")
IF 0[Y
GOTO PROD
SET ^%ZOSF("PROD")=X
+3 ;See that VOL and PROD agree.
+4 IF ^%ZOSF("PROD")'[^%ZOSF("VOL")
SET ^%ZOSF("VOL")=$PIECE(^%ZOSF("PROD"),",",2)
VOL WRITE !,"The VOLUME name must match the one in PRODUCTION."
+1 WRITE !,"NAME OF VOLUME SET: "_^%ZOSF("VOL")_"//"
READ X:DTIME
+2 IF X]""
Begin DoDot:1
+3 IF ^%ZOSF("PROD")'[X
WRITE !,"Must match PRODUCTION"
+4 IF X?3U
SET ^%ZOSF("VOL")=X
End DoDot:1
IF X'?3U
WRITE "MUST BE 3 Upper case."
GOTO VOL
TMP ;Get the temp directory
+1 WRITE !,"The temp directory for the system: '"_^%ZOSF("TMP")_"'//"
+2 READ X:DTIME
IF $LENGTH(X)
IF X'?1"/".E
GOTO TMP
+3 IF $LENGTH(X)
SET ^%ZOSF("TMP")=X
+4 WRITE !,"^%ZOSF setup"
+5 QUIT
+6 ;
Z ;
+1 ;;ACTJ
+2 ;;S Y=$$ACTJ^%ZOSV()
+3 ;;AVJ
+4 ;;S Y=$$AVJ^%ZOSV()
+5 ;;BRK
+6 ;;U $I:(CENABLE)
+7 ;;DEL
+8 ;;D DEL^%ZOSV2(X) ;N %RD,%OD S %RD=$P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/",%OD=$S($ZRO["(":$P($ZRO,"(",1)_"/",1:%RD) ZSYSTEM "rm -f "_%RD_X_".m" ZSYSTEM "rm -f "_%OD_X_".o"
+9 ;;EOFF
+10 ;;U $I:(NOECHO)
+11 ;;EON
+12 ;;U $I:(ECHO)
+13 ;;EOT
+14 ;;S Y=$ZA\1024#2 ; <=====
+15 ;;ERRTN
+16 ;;^%ZTER
+17 ;;ETRP
+18 ;;Q
+19 ;;GD
+20 ;;G ^%GD
+21 ;;$INC
+22 ;;0
+23 ;;JOBPARAM
+24 ;;G JOBPAR^%ZOSV
+25 ;;LABOFF
+26 ;;U IO:(NOECHO) ; <=====
+27 ;;LOAD
+28 ;;D LOAD^%ZOSV2(X) ;S %N=0 F XCNP=XCNP+1:1 S %N=%N+1,%=$T(+%N^@X) Q:$L(%)=0 S @(DIF_XCNP_",0)")=%
+29 ;;LPC
+30 ;;S Y="" ; <=====
+31 ;;MAGTAPE
+32 ;;S %MT("BS")="*1",%MT("FS")="*2",%MT("WTM")="*3",%MT("WB")="*4",%MT("REW")="*5",%MT("RB")="*6",%MT("REL")="*7",%MT("WHL")="*8",%MT("WEL")="*9" ; <=====
+33 ;;MAXSIZ
+34 ;;Q
+35 ;;MGR
+36 ;;VAH,ROU
+37 ;;MTBOT
+38 ;;S Y=$ZA\32#2 ; <=====
+39 ;;MTERR
+40 ;;S Y=$ZA\32768#2 ; <=====
+41 ;;MTONLINE
+42 ;;S Y=$ZA\64#2 ; <=====
+43 ;;MTWPROT
+44 ;;S Y=$ZA\4#2 ; <=====
+45 ;;NBRK
+46 ;;U $I:(NOCENABLE)
+47 ;;NO-PASSALL
+48 ;;U $I:(ESCAPE:TERMINATOR="":NOPASTHRU)
+49 ;;NO-TYPE-AHEAD
+50 ;;U $I:(NOTYPEAHEAD)
+51 ;;PASSALL
+52 ;;U $I:(NOESCAPE:NOTERMINATOR:PASTHRU)
+53 ;;PRIINQ
+54 ;;S Y=$$PRIINQ^%ZOSV()
+55 ;;PRIORITY
+56 ;;Q ;G PRIORITY^%ZOSV
+57 ;;PROD
+58 ;;VAH,ROU
+59 ;;PROGMODE
+60 ;;S Y=$$PROGMODE^%ZOSV()
+61 ;;RD
+62 ;;G ^%RD
+63 ;;RESJOB
+64 ;;Q:'$D(DUZ) Q:'$D(^XUSEC("XUMGR",+DUZ)) N XQZ S XQZ="^FORCEX[MGR]" D DO^%XUCI ; <=====
+65 ;;RM
+66 ;;U $I:WIDTH=$S(X<256:X,1:0)
+67 ;;RSEL
+68 ;;K ^UTILITY($J) D ^%RSEL S X="" X "F S X=$O(%ZR(X)) Q:X="""" S ^UTILITY($J,X)=""""" K %ZR
+69 ;;RSUM
+70 ;;S Y=0 F %=1,3:1 S %1=$T(+%^@X),%3=$F(%1," ") Q:'%3 S %3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*%2+Y
+71 ;;RSUM1
+72 ;;N %,%1,%2,%3 S Y=0 F %=1,3:1 S %1=$T(+%^@X),%3=$F(%1," ") Q:'%3 S %3=$S($E(%1,%3)'=";":$L(%1),$E(%1,%3+1)=";":$L(%1),1:%3-2) F %2=1:1:%3 S Y=$A(%1,%2)*(%2+%)+Y
+73 ;;SS
+74 ;;D ^ZSY
+75 ;;SAVE
+76 ;;D SAVE^%ZOSV2(X) ;N %I,%F S %I=$I,%F=$P($S($ZRO["(":$P($P($ZRO,"(",2),")"),1:$ZRO)," ")_"/"_X_".m" O %F:(NEWVERSION) U %F X "F S XCN=$O(@(DIE_XCN_"")"")) Q:+XCN'=XCN S %=@(DIE_XCN_"",0)"") Q:$E(%,1)=""$"" I $E(%)'="";"" W %,!" C %F U %I
+77 ;;SIZE
+78 ;;S Y=0 F I=1:1 S %=$T(+I) Q:%="" S Y=Y+$L(%)+2 ; <=====
+79 ;;TEST
+80 ;;I X]"",$T(^@X)]""
+81 ;;TMK
+82 ;;S Y=$ZA\16384#2
+83 ;;TMP
+84 ;;/tmp/
+85 ;;TRAP
+86 ;;$ZT="G "_X
+87 ;;TRMOFF
+88 ;;U $I:(TERMINATOR="")
+89 ;;TRMON
+90 ;;U $I:(TERMINATOR=$C(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127))
+91 ;;TRMRD
+92 ;;S Y=$A($ZB)
+93 ;;TYPE-AHEAD
+94 ;;U $I:(TYPEAHEAD)
+95 ;;UCI
+96 ;;S Y=^%ZOSF("PROD")
+97 ;;UCICHECK
+98 ;;S Y=1
+99 ;;UPPERCASE
+100 ;;S Y=$TR(X,"abcdefghijklmnopqrstuvwxyz","ABCDEFGHIJKLMNOPQRSTUVWXYZ")
+101 ;;XY
+102 ;;S $X=DX,$Y=DY ; <=====
+103 ;;VOL
+104 ;;ROU
+105 ;;ZD
+106 ;;S Y=$$HTE^XLFDT(X,2) I $L($P(Y,"/"))=1 S Y=0_Y