Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: AFSLCK1

AFSLCK1.m

Go to the documentation of this file.
AFSLCK1 ; IHS/OIRM/DSD/JDM-OPEN HFS/FILES;     [ 10/27/2004   4:21 PM ]
 ;;3.0t1;1166 APPROVALS FOR PAYMENT;**13**;
 ;;MODIFIED FOR CACHE' COMPLIANCE ACR*2.1*9 IM13574
 Q  ;NOT AN ENTRY POINT
PADWRITE ; ENTRY POINT.
 U %DEV W X,!
 Q
OHFSDOC ;;VARIABLES REQUIRED FOR OPENHFS CALL
 ;;
 ;;   %DEV      -- INITIALLY SET TO 51
 ;;   %FN       -- UNIX FILE NAME (FULL PATH IF NEC)
 ;;   AFSERMSG  -- CONTAINS ERROR MESSAGE (VARIABLE OUT)
 ;;   Y         -- CONTAINS COMPLETION CODE( >0 = ERROR) (VARIABLE OUT)
 ;;   %IN       -- OPEN PARAMETER (1=READ ONLY) DEFAULT VALUE
 ;;   %FO       --  FILE OFFSET (DEFAULT = 0)
OPENHFS ;EP
 ;I '$D(%DEV) S %DEV=51                      ;ACR*2.1*13.01 IM13574
 ;I '$D(%IN) S %IN=1                         ;ACR*2.1*13.01 IM13574
 ;I '$D(%FO) S %FO=0                         ;ACR*2.1*13.01 IM13574
 ;S N=$L(%FN,"/")                            ;ACR*2.1*13.06 IM14144
 ;S ZISH1=$P(%FN,"/",1,N-1)_"/"              ;ACR*2.1*13.06 IM14144
 ;S ZISH2=$P(%FN,"/",N)                      ;ACR*2.1*13.06 IM14144
 ;S ZISH3=$S(%IN=1:"R",%IN=0:"W",1:"R")      ;ACR*2.1*13.01 IM13574
 ;S ZISH4="R"                                ;ACR*2.1*13.01 IM13574
 ;S Y=$$OPEN^ZISHMSMU(ZISH1,ZISH2,ZISH3)     ;ACR*2.1*13.01 IM13574
 ;I Y'=0 S AFSERMSG="M10"                    ;ACR*2.1*13.01 IM13574
 ;E  S %DEV=IO                               ;ACR*2.1*13.01 IM13574
 N AFSLDEL,AFSLN                             ;ACR*2.1*13.01 IM13574
 S AFSLDEL=$E(%FN)                           ;ACR*2.1*13.01 IM13574
 S AFSLN=$L(%FN,AFSLDEL)                     ;ACR*2.1*13.01 IM13574
 S ZISH1=$P(%FN,AFSLDEL,1,AFSLN-1)_AFSLDEL   ;ACR*2.1*13.01 IM13574
 S ZISH2=$P(%FN,AFSLDEL,AFSLN)               ;ACR*2.1*13.01 IM13574
 S ZISH3=$S($G(%IN)=0:"W",1:"R")             ;ACR*2.1*13.01 IM13574
 D HFS^ACRFUTL(ZISH1,ZISH2,ZISH3,.%DEV)      ;ACR*2.1*13.01 IM13574
 I $G(%DEV)']"" S AFSERMSG="M10"             ;ACR*2.1*13.01 IM13574
 Q
ERROR ;EP
 G ERROREX:'$D(AFSERMSG)
 S X=$P($T(@AFSERMSG),";;",2)
ERROREX S AFSJFLG=1 K AFSERMSG Q
BTRMDEF ;EP
 W !!!,"PROPER TERMINAL ATTRIBUTES MISSING  -  NOTIFY SITE MANAGER",!! H 3 Q
 ;
CLOSE ;EP;TO CLOSE %ZISH OPENED DEVICE *** ACR*2.1*13.01 IM13574
 D CLOSE^%ZISH()
 K IOP,IOPAR,%ZIS,ZTSK,ZTQUEUED,ZTREQ
 Q
M1 ;;COMPUTER CENTER FOR TELECOMMUNICATIONS NOT CORRECTLY DEFINED
M2 ;;IHS COMM PARAMETERS NOT SET FOR THIS LOCATION
M3 ;;3780 TELECOMMUNICATIONS PORT NOT DEFINED
M4 ;;REMOTE NUMBER NOT DEFINED FOR THIS COMPUTER CENTER"
M5 ;;USER ID OR USER PASSWORD NOT DEFINED
M6 ;;DEFAULT 3780 COMMUNICATION PORT IN USE
M7 ;;ALL 3780 COMMUNICATION PORTS ARE BUSY
M8 ;;ALL UNIX HFS DEVICES ARE BUSY
M9 ;;PROGRAM AND/OR FUNCTION CANCELLED BY OPERATOR
M10 ;;OPEN FAILURE ON UNIX HFS FILE
M11 ;;DEFAULT PRINTER PORT NOT CORRECTLY DEFINED
M12 ;;PRINTER SET-UP ERROR -- NOTIFY SUPERVISOR
M13 ;;EXPORT AND/OR APPLICATION PARAMETERS NOT SET CORRECTLY
M14 ;;PACKAGE PREFIX NOT FOUND