Cobol - Nu compila en Vax-Cobol

<<>>
 
Vista:

Nu compila en Vax-Cobol

Publicado por SuperIndio (36 intervenciones) el 10/05/2024 06:40:58
Estoy migrando de CA-Realia a Cobol de Digital Vax y este codigo estas son rutina de lectura,
nunca usé la sentencia
1
READ STOCK 	 WITH IGNORE LOCK
1
Warning 0034E - Error undefined reference to 'IGNORE LOCK'

como funciona?
he aqui todo el codigo

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
*==================================================================
      *
      *    The routine READ-ERROR will be performed if a status other than
      *    zero is returned after any READ or START request and requires
      *    that the file number to be moved to WS-F-ERROR before being
      *    performed.
      *
      *    On returning from READ-ERROR, WS-ERROR will contain a value as
      *    follows:
      * 	    0 - No error or status to report
      * 	    1 - Record locked
      * 	    2 - Duplicate key
      * 	    3 - No Record / End of file / Invalid key
      * 	    4 - File already open
      * 	    5 - File already closed
      * 	    6 - Index corrupted
      * 	    7 - Network / Communication error
      * 	    8 - Limit exceeded - Record locks
      * 	    9 - File limit exceeded (files open)
      * 	   10 - Open for output
      * 	   11 - Open for input
      * 	   12 - File locked
      * 	   13 - File not open
      * 	   14 - File not open for I/O
      * 	   99 - All other errors
      *
006840 READ-VEHICLE.
006850	     READ VEHICLE	 WITH IGNORE LOCK
	       KEY IS VEH-CODE.
006860     IF WS-STATUS = "00"
006890         MOVE ZERO         TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
009900     IF WS-STATUS = "23"
006890	       MOVE 54		 TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
006880     IF WS-STAT1 = "2" OR "3" OR "4"
006890	       MOVE 54		 TO WS-F-ERROR
006900         PERFORM READ-ERROR.
	     GO TO READ-VEHICLE-EXIT.
 
006840 READ-VEHICLE-LOCK.
006850	     READ VEHICLE WITH KEPT LOCK
	       KEY IS VEH-CODE.
006860     IF WS-STATUS = "00"
006890         MOVE ZERO         TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
009900     IF WS-STATUS = "23"
006890	       MOVE 54		 TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
006880     IF WS-STAT1 = "2" OR "3" OR "4"
006890	       MOVE 54		 TO WS-F-ERROR
006900         PERFORM READ-ERROR.
006910     IF RECORD-LOCKED
	       MOVE W02-VEHICLE	 TO WS-FILE
	       MOVE ZERO	 TO WS-KEY
006920         PERFORM LOCKED-RECORD
006930	       GO TO READ-VEHICLE-LOCK.
008420     IF TOO-MANY-LOCKS
008430	       UNLOCK VEHICLE
008440	       GO TO READ-VEHICLE-LOCK.
	     GO TO READ-VEHICLE-EXIT.
 
006840 READ-VEHICLE-NEXT.
006850	     READ VEHICLE NEXT	 WITH IGNORE LOCK.
006860     IF WS-STATUS = "00"
006890         MOVE ZERO         TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
009900     IF (WS-STATUS = "23") OR
              (WS-STAT1 = "1")
006890	       MOVE 54		 TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
006880     IF WS-STAT1 = "2" OR "3" OR "4"
006890	       MOVE 54		 TO WS-F-ERROR
006900         PERFORM READ-ERROR.
	     GO TO READ-VEHICLE-EXIT.
 
006840 READ-VEHICLE-NEXT-LOCK.
006850	     READ VEHICLE NEXT WITH KEPT LOCK.
006860     IF WS-STATUS = "00"
006890         MOVE ZERO         TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
009900     IF (WS-STATUS = "23") OR
              (WS-STAT1 = "1")
006890	       MOVE 54		 TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
006880     IF WS-STAT1 = "2" OR "3" OR "4"
006890	       MOVE 54		 TO WS-F-ERROR
006900         PERFORM READ-ERROR.
006910     IF RECORD-LOCKED
	       MOVE W02-VEHICLE	 TO WS-FILE
	       MOVE ZERO	 TO WS-KEY
006920         PERFORM LOCKED-RECORD
006930	       GO TO READ-VEHICLE-NEXT-LOCK.
008420     IF TOO-MANY-LOCKS
008430	       UNLOCK VEHICLE
008440	       GO TO READ-VEHICLE-NEXT-LOCK.
	     GO TO READ-VEHICLE-EXIT.
 
006840 START-AT-REGIST.
006850	     START VEHICLE
	       KEY >= VEH-CODE.
006860     IF WS-STATUS = "00"
006890         MOVE ZERO         TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
009900     IF WS-STATUS = "23"
006890	       MOVE 54		 TO WS-F-ERROR
006870	       GO TO READ-VEHICLE-EXIT.
006880     IF WS-STAT1 = "2" OR "3" OR "4"
006890	       MOVE 54		 TO WS-F-ERROR
006900         PERFORM READ-ERROR.
 
007120 READ-VEHICLE-EXIT.
007130       EXIT.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder