can not open a gateway


[ Follow Ups ] [ Post Followup ] [ Signature.net Forum ] [ FAQ ]

Posted by Stephen Auerbach on Tue, 02 Sep 2003 13:43:30 :

Please please, I need help on this one.
=20
How can I get an Error 11 on the Gateway if I successfully found the
gateway at the start of the program? It's not a file already OPEN error;
Comet is telling me it can not find the gateway that I just found.
=20
I have attached the code.
=20
=20
_____ =20

08/28/03 13:31:46 P70 MSI ERROR #: 11 FILE NOT FOUND
VSN: 603.323 LUN: 4 FILE: G00 . DIR:
KEY:
=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=
=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=
=88=88=88=88=88=88=88=88=88=88=88=88=88=88
SYS FUNC: 03 OPEN
DOS FUNC: 3E CLOSE A FILE HANDLE
DOS ERR : 00 NO DOS ERROR REPORTED
DOS HANDLE: 0000 PATH: \\NTSERVER1\APPS\COMET\SCC\MSI.OBJ=88
NODE NAME : SCALE2
USER ADDR :00C8 00D5 00DE 00E2 00EA 00EF 00F7 00FB 00FF 0102 010E 0113
0119 0123
STACK ADDR:3230 2F7B 16C7 43F3 16CF 4322 2F61 16C7 68C7 166F 1810 25DF
2516 16AF
_____ =20

=20
=20
SAuerbach
nospam@xxxxxxxx
=20


--Boundary_(ID_ASjgPyTU/e/Vf8rugdKHXQ)
Content-type: text/html; charset=windows-1251
Content-transfer-encoding: quoted-printable



charset=3Dwindows-1251">
Message




FONT-FAMILY: Arial"=20
background=3Dcid:817233217@02092003-0D04>

Please please,  I need  =
help on=20
this one.

 

How can I get an Error 11 on the =
Gateway if=20
I successfully found the gateway at the start of the program? It's not a =
file=20
already OPEN error; Comet is telling me it can not find the gateway that =
I just=20
found.

 

I have attached the =
code.

 

 





08/28/03 13:31:46 P70 MSI      ERROR #: 11 =
FILE=20
NOT =
FOUND
           =
VSN:=20
603.323           =
=20
LUN:  4 FILE: G00     .     =

DIR:
           =
KEY:=20
=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=
=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=88=
=88=88=88=88=88=88=88=88=88=88=88=88=88=88
    &nb=
sp;           &nbs=
p;            =
;=20
SYS FUNC: 03=20
OPEN
           =
;            =
      =20
DOS FUNC: 3E CLOSE A FILE=20
HANDLE
          &nb=
sp;           &nbs=
p;      =20
DOS ERR : 00 NO DOS ERROR REPORTED
DOS HANDLE: 0000  PATH: href=3D"file://\\NTSERVER1\APPS\COMET\SCC\MSI.OBJ">\\NTSERVER1\APPS\COMET=
\SCC\MSI.OBJ=88
NODE=20
NAME : SCALE2
USER ADDR :00C8 00D5 00DE 00E2 00EA 00EF 00F7 00FB 00FF =
0102=20
010E 0113 0119 0123
STACK ADDR:3230 2F7B 16C7 43F3 16CF 4322 2F61 =
16C7 68C7=20
166F 1810 25DF 2516 16AF





 

 

SAuerbach

href=3D"mailto:nospam@xxxxxxxx">nospam@xxxxxxxx
ONT=20
color=3D#000000>

 



--Boundary_(ID_ASjgPyTU/e/Vf8rugdKHXQ)--

--Boundary_(ID_yXkUjtf/qf9hZlncxBZmnw)
Content-id: <817233217@02092003-0D04>
Content-type: application/octet-stream; name="Blank Bkgrd.gif"
Content-transfer-encoding: base64
Content-disposition: attachment; filename="Blank Bkgrd.gif"

R0lGODlhLQAtAID/AP////f39ywAAAAALQAtAEACcAxup8vtvxKQsFon6d02898pGkgiYoCm6sq2
7iqWcmzOsmeXeA7uPJd5CYdD2g9oPF58ygqz+XhCG9JpJGmlYrPXGlfr/Yo/VW45e7amp2tou/lW
xo/zX513z+Vt+1n/tiX2pxP4NUhy2FM4xtjIUQAAOw==

--Boundary_(ID_yXkUjtf/qf9hZlncxBZmnw)--

--Boundary_(ID_IpJpeUBPG5lWMrV6z5dEpw)
Content-type: application/octet-stream; name=MSI.IBS
Content-transfer-encoding: quoted-printable
Content-disposition: attachment; filename=MSI.IBS

! //IB// obj(MSI,SCC) Opt(B)
!
!
! Scale entry program using the Serial Port Gateway
!


USE "^I4" ! Ticket file format 0948
ROUND ITQTY
USE "^I3A" ! Bar Header File format 0945
Use "^I1S" ! Spool Master format 0919

Length 4.0 & Local SeqNbr
2699 Format__ !Z1 Record keyed by *MSI + Term$
SeqNbr

use "^ZCOMMON"

!=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Working Storage =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Length 1.0 & Local SerialPort Err
Length 3.0 & Local I
Length 5.0 & Local EntryNumb
Length 6.0 & Local CreateDate Today
Length 9.6 & Local Tare
Length 3 & Local GateName$
Length 4 & Local SeqNbr$ An$
Length 8 & Local I4Created$
Length 12 & Local ScalIn$
Length 80 & Local Result$
Length 100 & Local FSTAT$

2700 Format__
(CPL80);(SB);(BF);@(00,00);"MSI"; @(20,0);"Scale Data Entry"

2710 Format__
(SB); @(0,2);(BF);@(0,2);"Entry No. Bar No Spl ID Numb =
Spools";__
" Scale Wgt Metal Wgt"

2720 Format __
@(0,3);SeqNbr$;_
@(12,3); (TM);IBARNBR$;(TM);_
@(24,3); (TM);SpoolId$;(TM);__
@(38,3); (TM);NumSpl$;(TM);__
@(48,3); (TM);(RJ);ScalWgt,(BZ);(TM)

Set I4 =3D 1 I3A =3D 2 I1S =3D 3 Serial =3D 4
Set Yes =3D 1 No =3D 0

ClearLocal
2900
Close & Open (0) Term$
Print (0,2700)
Print (0,2710)
Open (i4) "I4" Excp =3D CreateI4
Open (I3A) "I3A"
Open (I1S) "I1S"
Gosub CheckCreateDate
Gosub GetSeqnumber

Find.Gateway:
For I =3D 100 to 199
GateName$ =3D 'G' + SUB(STRIP(STR(I)), 2, 2)
If Sub(DSTAT(GateName$, Excp=3DTryNextGateway), 4, 1) EQ '@06@'
Goto Main
Endif

TryNextGateway:
Next I
Print @(0,20);"Fatal Error. Can not find a serial port"
Wait
Run "Z"


Main:
SeqNbr =3D SeqNbr + 1
SeqNbr$ =3D Str(SeqNbr)
Print (0,2720) !Input line format
3100
If EntryNumb LE 5
Print @(10,18);"Enter # in Bar Number to correct a mistake"
Endif
Print @(12,3)
Pause (18) !Time for serial to close
Input IBarNbr$
If IBarNbr$ eq ""
Close
Run "Z"
Endif
If EntryNumb Le 5
Print @(0,18);(BF)
ENDIF
If IBarNbr$ EQ "#"
Goto Correct
Endif
Inquire (I3A,0945) Key =3D IBarNbr$ Excp=3DInvalidBar
!=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Open (Serial) GateName$
Result$ =3D Control(Serial, "Open Com1:2400,N,8,1")
If SUB(Result$,1,1) eq "-"
Print @(0,23);"Error opening scale ";Result$
Wait
Run "qmonitor"
Endif
Result$ =3D Control(Serial, "Delimiter @0A@")
!=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
3200
Print @(24,3)
Input SpoolID$
Inquire(I1S,0919) Key=3DSpoolID$ Excp=3DInvalidSplID
print @(38,3)
input NumSpl$
DO
Input (Serial) ScalIn$
LOOP UNTIL RSUB(ScalIn$,1,1) eq "S"
ScalWgt =3D Num(Sub(ScalIn$,1,9),err)
Print (0,2720)
Tare =3D SplWgt * Num(NumSpl$,Err)
If Tare GE ScalWgt
Print @(0,23);"@07@ Spool Tare Exceeds Scale Wgt!!"
wait
Goto 3200
Endif
ITQTY =3D ScalWgt - Tare
!!!PRINT @(0,20);"TARE<";TARE & WAIT
Print @(60,3); ITQTY
ITCKNBR$ =3D Term$ + SeqNbr$
ITDATE$ =3D ZDATE$
Write (I4,0948) Key =3D ITCKNBR$
IBARNBR$ =3D ''
SpoolId$ =3D ''
NumSpl$ =3D ''
ScalWgt =3D 0
Print @(0,3);(LI)
Scalin$ =3D ""
Close (Serial)
EntryNumb=3DEntryNumb+1
Goto Main


InvalidBar:
Print @(0,23);"@07@ Error Bar Number not on file"
Wait
Print @(0,23);(BF)
Go to 3100

InvalidSplID:
Print @(0,23);"@07@ Error Spool ID not on file"
Wait
Print @(0,23);(BF)
Goto 3200

Correct:
Print @(55,23);(TM); @(10,23);"Enter Sequence Number to be =
changed";(TM)
Input An$
Print @(0,23);(BF)
SeqNbr$ =3D An$ + " "
SeqNbr$ =3D ADJUSTR(SeqNbr$)
Read (I4,0948)Key=3DTerm$ + SeqNbr$ Excp=3DLineError
Print @(55,23);(TM); @(5,23);"(C)hange line ";SeqNbr$; " or (D)elete =
it?";(TM)
Input An$
If An$ EQ ""
Goto 3100
Endif
If An$ EQ "D"
Delete (I4) Key=3DTerm$+SeqNbr$
Goto 3100
Endif

Print (0,2720)
Goto 3100
LineError:
Print "Invalid Seq Number"
Wait
Goto Correct

CreateI4:
Create "I4", Recl0948, K, Keyl0948, DIR=3DZRMD$
goto 2900

CheckCreateDate:
FSTAT$ =3D FSTAT("I4")
I4Created$=3DSub(FSTAT$,62,8)
Today =3D Date2Num(Date$,0)
CreateDate =3D Date2Num(I4Created$,0)
If Today - CreateDate GT 20
Print @(6,23);(TM);" The Inventory File is 30 days old. (U)se it or =
(E)rase it?";(tm)
Input An$
If An$ EQ "E"
Close & Open (0) Term$
ERASE "I4"
Popall
Goto 2900
Endif
Endif
Return


GetSeqnumber:
Position (I4)Key =3D Term$ Excp=3DGS2
GS1:
If SUB(Key(I4,EXCP=3DGS2),1,3) NE Term$
Goto GS2
Endif
Read(I4,0948)
SeqNbr$ =3D Sub(ITCKNBR$,4,4)
SeqNbr =3D Num(SeqNbr$,err)
Goto GS1
GS2:
IBARNBR$ =3D ''
SpoolId$ =3D ''
NumSpl$ =3D ''
ScalWgt =3D 0
Return




--Boundary_(ID_IpJpeUBPG5lWMrV6z5dEpw)--




Follow Ups: