ACHSHVR0 ; IHS/ITSC/PMF - RECEIVE NOTIFICATION REPORT FROM VENDOR/FAC ; [ 10/16/2001 8:16 AM ]
;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
;
I '$D(^AUTTTEL(DUZ(2),2)) U IO(0) W *7,?10,"UNIX 3780 PORT NOT DEFINED FOR THIS FACILITY - CONTACT SITE MANAGER" G ABEND
S ACHSTTY=$P(^AUTTTEL(DUZ(2),2),U,1)
I $L(ACHSTTY)=1 S ACHSTTY="0"_ACHSTTY
D ^ACHSTUT2
A0 ;
S ACHS3780="cd /usr/bin/3780;3780Plus -d /dev/tty"_ACHSTTY_" -c /usr/bin/3780/3780.cfgachs.s -j /usr/bin/3780/achshv.rec.j"
S X="",ACHSHCMD=ACHS3780
S ACHSRTCD=$$TERMINAL^ACHSHCMD(ACHSHCMD)
I ACHSRTCD=0 G TXOK
I ACHSRTCD=18 U IO(0) W *7,!!?10,"3780 RECEIVE SESSION FAILURE -- CONTACT SITE MANAGER" G ABEND
I X=ACHSRTCD U IO(0) W *7,!!?10,"Auto-Answer Timeout Limit Reached - Receive not Completed" G ABEND
U IO(0)
W *7,!!?10,"UNKNOWN error." G ABEND
EXIT ;
K X,Y,ACHS3780,ACHSTTY
Q
;
TXOK ;
U IO(0)
W !!?10,"Transmission Successful"
ABEND ;
U IO(0)
I $$DIR^XBDIR("E","Enter <RETURN> to Continue","","","","",1)
G EXIT
;
ACHSHVR0 ; IHS/ITSC/PMF - RECEIVE NOTIFICATION REPORT FROM VENDOR/FAC ; [ 10/16/2001 8:16 AM ]
+1 ;;3.1;CONTRACT HEALTH MGMT SYSTEM;;JUN 11, 2001
+2 ;
+3 IF '$DATA(^AUTTTEL(DUZ(2),2))
USE IO(0)
WRITE *7,?10,"UNIX 3780 PORT NOT DEFINED FOR THIS FACILITY - CONTACT SITE MANAGER"
GOTO ABEND
+4 SET ACHSTTY=$PIECE(^AUTTTEL(DUZ(2),2),U,1)
+5 IF $LENGTH(ACHSTTY)=1
SET ACHSTTY="0"_ACHSTTY
+6 DO ^ACHSTUT2
A0 ;
+1 SET ACHS3780="cd /usr/bin/3780;3780Plus -d /dev/tty"_ACHSTTY_" -c /usr/bin/3780/3780.cfgachs.s -j /usr/bin/3780/achshv.rec.j"
+2 SET X=""
SET ACHSHCMD=ACHS3780
+3 SET ACHSRTCD=$$TERMINAL^ACHSHCMD(ACHSHCMD)
+4 IF ACHSRTCD=0
GOTO TXOK
+5 IF ACHSRTCD=18
USE IO(0)
WRITE *7,!!?10,"3780 RECEIVE SESSION FAILURE -- CONTACT SITE MANAGER"
GOTO ABEND
+6 IF X=ACHSRTCD
USE IO(0)
WRITE *7,!!?10,"Auto-Answer Timeout Limit Reached - Receive not Completed"
GOTO ABEND
+7 USE IO(0)
+8 WRITE *7,!!?10,"UNKNOWN error."
GOTO ABEND
EXIT ;
+1 KILL X,Y,ACHS3780,ACHSTTY
+2 QUIT
+3 ;
TXOK ;
+1 USE IO(0)
+2 WRITE !!?10,"Transmission Successful"
ABEND ;
+1 USE IO(0)
+2 IF $$DIR^XBDIR("E","Enter <RETURN> to Continue","","","","",1)
+3 GOTO EXIT
+4 ;