HP OpenVMS Systemsask the wizard |
The Question is: I have is old macro that I can't compile? What is the problem? Looks to me that it should complile. Any assist would be wonderful. Thank you. RFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 1 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 00000000 1 .TITLE RFILE 00000000 2 .SBTTL DECLARATIONS 00000000 3 ; 00000000 4 ; 00000000 5 ; Routine to read many different types of VAX files (from 00000000 6 ; batch log files thru variable length and no record 00000000 7 ; attributes). This routine was originally written to 00000000 8 ; read the mi nimum number of files to satisfy DA/CRS work 00000000 9 ; with PLM. This includes: 00000000 10 ; log files: VFC, print files 00000000 11 ; obj files: variable length, no rec ord attributes 00000000 12 ; lst files: variable length, no record attributes 00000000 13 ; SOS files: VFC, carriage return (line sequence 00000000 14 ; numbers are strippe d). 00000000 15 ; Fortran files: variable length, Fortran 00000000 16 ; Fortran files: VFC, Fortran 00000000 17 ; 00000000 18 ; 00000000 19 ; 00000000 20 ; 00000000 21 ; FUNCTIONAL DESCRIPTION: 00000000 22 ; Fill the byte array BUFFER with data from file. 00000000 23 ; 00000000 24 ; FORTRAN CALLING SEQUENCE: 00000000 25 ; CALL RFILE ( NAME, BUFFER, NBUFF, BUFFN, IERROR ) 00000000 26 ; 00000000 27 ; INPUTS: 00000000 28 ; NAME- Character descriptor of file name to be opened. 00000000 29 ; BUFFER- buffer holding binary data. 00000000 30 ; NBUFF- size of BUFFER (number of 8-bit bytes). 00000000 31 ; 00000000 32 ; OUTPUTS: 00000000 33 ; BUFFN- Number of bytes in file (used in BUFFER). 00000000 34 ; IERROR- Error flag. 0=OK. Non-zero then problem. 00000000 35 ; 00000000 36 ; ROUTINE VALUE: 00000000 37 ; Success status 00000000 38 ; 00000000 39 ; SIDE EFFECTS: 00000000 40 ; none 00000000 41 ; 00000000 42 ; REGISTER CONVENTIONS: 00000000 43 ; R8 <-- FAB address 00000000 44 ; R9 <-- RAB address 00000000 45 ; R10 <-- BUFFER address 00000000 46 ; R11 <-- Number of bytes in BUFFER to output. 00000000 47 ; 00000000 48 ; 0000000 0 49 ; 00000000 50 ;*************************************************************** 00000000 51 ; 00000000 52 ; Macro Library Calls 00000000 53 ; Define necessary symbols... 00000000 54 .LIBRARY /SYS$LIBRARY:LIB/ 00000000 55 $FIBDEF ; File Information Block 00000000 413 $IODEF ; I/O definitions 00000000 952 $RMSDEF ; Record Management Services RFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 2 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 00000000 1236 ; 00000000 1237 ; EQUATED SYMBOLS 00000000 1238 ;00000004 00000000 1239 NAME = 400000008 00000000 1240 BUFFER = NAME+40000000C 00000000 1241 NBUFF = BUFFER+400000010 00000000 1242 BUFFN = NBUFF+400000014 00000000 1243 IERROR= BUFFN+4 00000000 1244 ; 00000000 1245 ; 00000000 1246 ; Define the source file FAB and RAB control Blocks 00000000 1247 ; 00000000 1248 ; 00000000 1249 SRC_FAB: 00000000 1250 $FAB FAC=<GET>, - ; File access for GET only 00000000 1332 FOP=<SQO>, - ; DAP file transfer mode 00000000 1333 FNM=<SRC:> ; Name of input file 1... .... %AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code st ream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code strea m%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%A MAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code streamRFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 3 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1 ) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 00000050 1589 SRC_RAB: 00000050 1590 $RAB FAB=SRC_FAB, - ; Address of associated FAB 00000050 1633 RAC=SEQ, - ; Sequential record accesss 00000050 1634 UBF=BUFFER, - ; Buffer address 00000050 1635 USZ=BUFFER_SIZE ; Buffer Size 1....... %AMAC-E-DATINCODE, (1) data in co de stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code str eam%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code streamRFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 4 DECLARATI ONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATIN CODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 00000094 1979 ; 00000094 1980 ; 00000094 1981 ; Local storage... 00000094 1982 DST_FAB: 00000094 1983 $FAB FAC=<GET>, - ; File access for GET only 00000094 1984 FOP=<CBT>, - ; Contiguous Best try fil e access 00000094 1985 SHR = <NIL>, - 00000094 1986 FNM=<DST:>, - 00000094 1987 RFM=VAR, - 000000E4 1988 RAT=<CR> 1....... %AMAC-E -DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DA TINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATIN CODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code streamRFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 5 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data i n code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in c ode stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 000000E4 1989 DST_RAB: 000000E4 1990 $RAB FAB=DST_FAB,- ; 000000E4 1991 MBF=3,- 000000E4 1992 RBF=BUFFER,- 00000128 1993 RSZ=BUFFER_SIZE 1....... %AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in c ode stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code streamRFILE So urce Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 6 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2%AMAC-E-DATINCODE, (1) data in code stream%AMAC- E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-D ATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 00000128 1994 00000128 1995 ; 00000128 1996 ; 00000128 1997 CRLF: .BYTE 13,10 ;<cr>,<lf> 1 %AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 0000012A 1998 REQV2I: .LONG ^XAAAAAAAA ;First 4 bytes of a V2I file 1 %AMAC-E-DATINCODE, (1) data in code stream 0000012E 1999 PRNBUF: .BLKB 4096 0000112E 2000 NPRNBF: .LONG 4096 1 %AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DATINCODE, (1) data in code stream 00001132 2001 VFCBUF: .BLKB 100 00001196 2002 RECLEN: .LONG 20000 ;Set max record size to read 1 %AMAC-E-DATINCODE, (1) data in code stream%AMAC-E-DA TINCODE, (1) data in code stream 0000119A 2003 ; 0000119A 2004 ; 0000119A 2005 ;*************************************************************** 0000119A 2006 ; RFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 7 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 0000119A 2007 ; 0000119A 2008 .ENTRY RFILE,^M<R2,R3,R4,R5,R6,R7,R8,R9,R10,R11> 0000119C 2009 ; 0000119C 2010 ; Open the output file... 0000119C 20 11 MOVAB DST_FAB,R8 ;Get FAB address 1....... %AMAC-E-STORCODLAB, (1) stored code labels must be declared entry points in routine RFILE 000011A1 2012 MOVAB DST_RAB,R9 ;Get RAB address 1....... %AMAC-E-STORCODLAB, (1) stored code labels must be declared entry points in routine RFILE 000011A6 2013 ; Update FAB with desired file name... 000011A6 2014 MOVQ @NAME(AP),R4 ;Get "descriptor" 000011AA 2015 MOVZBL R4,R4 ;zero all but count 000011AD 2016 $FAB_STORE FAB=R8,FNS=R4,FNA=(R5) 000011B5 2207 ; Create the file... 000011B5 2208 $OPEN FAB=R8 000011BE 2257 BLBC R0,PROB2 000011C1 2258 $CONNECT RAB=R9 000011CA 2262 BLBC R0,PROB2 000011CD 2263 ; Initialize buffer address, number of bytes and buffer index... 000011CD 2264 MOVL BUFFER(AP),R10 ;R10 <= ADDR( BUFFER ) 000011D1 2265 MOVL @NBUFF(AP),R11 ;R11 <= number of bytes 000011D5 2266 MOVL #0,@BUFFN(AP) ;Number of bytes read=0. 000011D9 2267 ; Get the "record attribute" byte... 000011D9 2268 MOVZBL FAB$B_RAT(R8),R1 000011DD 2269 ; Print file? 000011DD 2270 BBC #FAB$V_PRN,R1,NXT1 000011E1 2271 JSB PRINTF ;It's a "print" file... 000011E7 2272 BRW EOB 000011EA 2273 ; Carriage return attribute fil e? 000011EA 2274 NXT1: BBC #FAB$V_CR,R1,NXT2 000011EE 2275 JSB VARCR ;It's a "carriage return" file. 000011F4 2276 BRW EOB 000011F7 2277 ; Fortran file? 000011F7 2278 NXT2: BBC #FAB$V_FTN,R1,NXT3 000011FB 2279 JSB VARCR ;It's a "fortran" file... 00001201 2280 BRW EOB 00001204 2281 ; None of the above...must b e "none"... 00001204 2282 NXT3: JSB VARNO 0000120A 2283 BRW EOB 0000120D 2284 ; All data has been read. Close file. 0000120D 2285 EOB: 0 000120D 2286 CMPL #RMS$_EOF,R0 00001214 2287 BNEQ PROB1 00001216 2288 ; 00001216 2289 ; Compute buffer size... 00001216 2290 MOVL @NBUFF(AP),R1 0000121A 2291 SUBL2 R11,R1 0000121D 2292 MOVL R1,@BUFFN(AP) 00001221 2293 $DISCONNECT RAB=R9 0000122A 2297 BLBC R0,PROB3 0000122D 2298 $CLO SE FAB=R8 00001236 2302 BLBC R0,PROB3 00001239 2303 CLRL @IERROR(AP) 0000123C 2304 RETRFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4 .1-11-3381U Page 8 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 0000123D 2305 PROB1: 0000123D 2306 PROB2: 0000123D 2307 PROB3: 0000123D 2308 PROB4: 0000123D 2309 MOVL R0,@IERROR(AP) 00001241 2310 RET 00001242 2311 ;**************************************** *********************** 00001242 2312 ; 00001242 2313 ; Routine to handle variable length, no record attributes. 00001242 2314 ; 00001242 2315 VARNO: 1 %AMAC-E-UNDECJSB, (1) undeclared local JSB target: VARNO 00001242 2316 MOVL RECLEN,R5 ;Set max record size 00001247 2317 $RAB_STORE RAB=R9,UBF=(R10),USZ=R5 0000124F 2365 $GET R AB=R9 00001258 2369 BLBC R0,EVARNO 0000125B 2370 MOVZWL RAB$W_RSZ(R9),R1 ;Get size of record just read 0000125F 2371 SUBL2 R1,R11 ; 00001262 2372 ADDL2 R 1,R10 ;Inc addr by record size. 00001265 2373 BRW VARNO 00001268 2374 EVARNO: 00001268 2375 RSB ;Return 00001269 2376 ;********************************* ****************************** 00001269 2377 ; 00001269 2378 VARCR: 1 %AMAC-E-UNDECJSB, (1) undeclared local JSB target: VARCR 00001269 2379 MOVL RECLEN,R5 ;Set max record size. 00001276 2380 $RAB_STORE RAB=R9,UBF=(R10),USZ=R5 0000127F 2381 $GET RAB=R9 0000127F 2382 BLBC R0,EVARCR 00001282 2383 ; 00001282 2384 MOVZWL RAB$W_RSZ(R9),R1 00001286 2385 SUBL2 R1,R11 00001289 2386 ADDL2 R1,R10 0000128C 2387 ; 0000128C 2388 MOVW CRLF,(R10) ;Add <cr>,<lf> to file ... 00001291 2389 ADDL2 #2,R10 ;Incr address 00001294 2390 SUBL2 #2,R11 ;Reduce byte count. 00001297 2391 BRW VARCR 0000129A 2392 EVARCR: 0000129A 2393 RSB ;Return 0000129B 2394 ;*************************************************************** 0000129B 2395 ; 0000129B 2396 ; Routine to read and expand a bat ch log file or a VFC 0000129B 2397 ; file with PRINT attribute. 0000129B 2398 ; 0000129B 2399 PRINTF: 1 %AMAC-E-UNDECJSB, (1) undeclared local JSB target: PRINTF 000012AD 2400 $RAB_STORE RAB=R9,UBF=PRNBUF,USZ=NPRNBF,RHB=VFCBUF 000012B6 2401 $GET RAB=R9 000012B6 2402 BLBC R0,EPRINTRFILE Source Listing 19-JUN- 2000 10:17:33 AMAC V4.1-11-3381U Page 9 DECLARATIONS 19-JUN-2000 10:17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 000012B9 2403 ; Add the "prefix" carriage control... 000012B9 2404 XP1: 000012B9 2405 MOVZBL VFCBUF,R1 000012BE 2406 JSB PRNTC 000012C4 2407 ; Set up and blast the block into the buffer... 000012C 4 2408 XP2: 000012C4 2409 MOVZWL RAB$W_RSZ(R9),R6 ;Get the number of bytes 000012C8 2410 MOVL RAB$L_RBF(R9),R7 ;Get the buffer address 000012CC 2411 MOVC3 R6,(R7),(R10) 000012D0 2412 ADDL2 R6,R10 ;Update buffer address 000012D3 2413 SUBL2 R6,R11 ;Update byte count. 000012D6 2414 ; Add the "postfix" carriage control... 000012D6 2415 XP3: 000012D6 2416 MOVZBL VFCBUF+1,R1 000012DB 2417 JSB PRNTC 000012E1 2418 BRW PRINTF ;Loop until EOF 000012E4 2419 EPRINT: 000012E4 2420 RSB 000012E5 2421 ; 000012E5 2422 ; Routine to expand the VFC byte of a print file and place 000012E5 2423 ; the expanded control in the output buffer. The VFC portion 000012E5 2424 ; of a print file contain various carriage control for both 000012E5 2425 ; the beginning and ending of the data. 000012E5 2426 PRNTC: 1 %AMAC-E-UNDECJSB, (1) undec lared local JSB target: PRNTC%AMAC-I-UNRCHCODE, (1) unreachable code 000012E5 2427 CMPB #0,R1 ;Is control <nul>? 000012E8 2428 BEQL EPRNTC ;If so, do nothing...go exit. 000012EA 2 429 BBS #7,R1,PRNSC ;Test the 'special control char' bit. 000012EE 2430 ; This is a count for new lines. Add the appropriate number 000012EE 2431 ; of <cr><lf> pairs to data buffer. 00 0012EE 2432 PRNCR: 000012EE 2433 MOVW CRLF,(R10) ;<cr> and <lf> into buffer... 000012F3 2434 ADDL2 #2,R10 ;Buffer addr <= Buffer addr + 2 000012F6 2435 SUBL2 #2,R11 ;Buffer cn t <= Buffer cnt - 2 000012F9 2436 SOBGTR R1,PRNCR ;CRLF count zero? If not, loop 000012FC 2437 RSB ;Count zero...return 000012FD 2438 ; This is a special control character (form f eed,?). There 000012FD 2439 ; are 2 forms. First test for reserved DEC characters. 000012FD 2440 PRNSC: 000012FD 2441 BBS #5,R1,EPRNTC ;If bit 5 is on, don't do anything. 00001301 2442 EXTZV #0,#5,R1,R2 ;Isolate bits 0 to 4... 00001306 2443 BBC #6,R1,PRNSC1 ;If bit 6 is off, output char as is.. 0000130A 2444 ADDL2 #128,R2 ;Bit 6 is on...bias char by 128 00001311 2445 PRNSC1: MOVB R2,(R10) ;Place character in buffer. 00001314 2446 INCL R10 ;Addr = Addr + 1 00001316 2447 DECL R11 ;Cnt = Cnt - 1 00001318 2448 EP RNTC: 00001318 2449 RSBRFILE Source Listing 19-JUN-2000 10:17:33 AMAC V4.1-11-3381U Page 10 DECLARATIONS 19-JUN-2000 10: 17:22 PES_DISK:[TEST]MY_RFILE.MAR;2 00001319 2450 .END 1....... %AMAC-E-PREVERROR, (1) previous errors prevent further analysis The Answer is : With the OpenVMS Alpha Macro32 compiler, you must segregate data from code. (This is what the error message is (unsuccessfully) trying to tell you.) Unfortunately, your source code got a bit scrambled in posting, so the OpenVMS Wizard cannot provide exact line numbers, however, adding PSECT definitions should help. Place something like: .PSECT DATA,RD,WRT,NOEXE above your data definitions, and: .PSECT CODE,RD,NOWRT,EXE above your code. $ HELP/MESSAGE DATINCODE DATINCODE, data in code stream Facility: AMAC, MACRO-32 Compiler for OpenVMS Alpha Explanation: Data was found in the code stream. This condition is not allowed on OpenVMS Alpha systems. User Action: For implicit JSB parameters, pass the parameter value in a register. If any values are larger than a longword, put them in another program section (psect) and explicitly pass its address. For data contiguous with code in the code stream, rewrite the code so that the data is in a data program section.
|