Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!pasteur!ucbvax!TOR.NTA.NO!dahls%vax.elab.unit.uninett From: dahls%vax.elab.unit.uninett@TOR.NTA.NO (J|rn Yngve Dahl-Stamnes) Newsgroups: comp.os.vms Subject: RMS question. Message-ID: <127*dahls@vax.elab.unit.uninett> Date: 26 May 88 12:14:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 319 To all RMS GURU's and WIZARD's !! I am trying to use a useropen routine when opening a file from fortran. The file get open, but I can't access it. When trying to read record 1 from it, I got the following error messages: %FOR-E-ERRDURREA, error during read ...... If I remove the err=1000 in the read line (se below), I do not get the error messages, but nothing is read from the file!!! Finally, if I don't use the useropen routine, everything works - no problem. The purpose of the useropen routine, is to get the $XABDAT, $XABPRO and $XABRDT fields - and it work just fine. I have tried to change the content of the fields FAB$L_FOB, FAB$B_SHR and FAB$B_RFM, but without any luck. Is there anyone out there who can help me to fix this problem? Open statement: --------------- open (unit=lun1, file=found1, recl=25, status='old', & form='unformatted', access='direct', readonly, & maxrec=1001, iostat=iostat, err=1000, & useropen=lio$ufopen) read (unit=lun1,rec=1,iostat=status,err=1000) record User open routine LIO$UFOPEN: ----------------------------- function lio$ufopen ( fab,rab,lun ) ! implicit none include '($fabdef)/nolist' include '($rabdef)/nolist' include '($xabdatdef)/nolist' include '($xabprodef)/nolist' include '($xabrdtdef)/nolist' external sys$open integer*4 sys$open record /xabdatdef/ xabdat record /xabprodef1/ xabpro record /xabrdtdef/ xabrdt common /lio_acc/ readonly common /lio_rms/ xabdat, xabpro, xabrdt integer*4 lio$ufopen integer*4 lun integer*4 status record /fabdef/ fab record /rabdef/ rab fab.fab$b_fac = fab$m_bio .or. fab$m_get fab.fab$b_org = fab$c_seq fab.fab$b_shr = fab$m_nil fab.fab$l_fop = fab$m_nam ! fab.fab$l_xab = %loc(xabdat) xabdat.xabdatdef$$_fill_4 = %loc(xabpro) ! = xab$l_nxt, xab chain xabpro.xabprodef$$_fill_4 = %loc(xabrdt) ! link address. xabrdt.xabrdtdef$$_fill_4 = 0 ! End of link. ! xabdat.xabdatdef$$_fill_1 = xab$c_dat ! = xab$b_cod xabdat.xabdatdef$$_fill_2 = xab$c_datlen ! = xab$b_bln ! xabpro.xabprodef$$_fill_1 = xab$c_pro ! = xab$b_cod xabpro.xabprodef$$_fill_2 = xab$c_prolen ! = xab$b_bln ! xabrdt.xabrdtdef$$_fill_1 = xab$c_rdt ! = xab$b_cod xabrdt.xabrdtdef$$_fill_2 = xab$c_rdtlen ! = xab$b_bln ! status = sys$open (fab) ! lio$ufopen = status return end Listing from the DEBUGGER before $OPEN is executed: --------------------------------------------------- set radix hex ex fab,rab !LIO$UFOPEN\FAB ! FAB$B_BID: 03 ! FAB$B_BLN: 50 ! FAB$W_IFI: 0000 ! ! (1): 00 ! (2): 00 ! FAB$L_FOP: 01000000 ! ! (1): 00 ! (2): 00 ! (3): 00 ! (4): 01 ! FAB$L_STS: 00000000 ! FAB$L_STV: 00000000 ! FAB$L_ALQ: 00000000 ! FAB$W_DEQ: 0000 ! FAB$B_FAC: 22 ! ! (1): 22 ! FAB$B_SHR: 20 ! ! (1): 20 ! FAB$L_CTX: 00000000 ! FAB$B_RTV: 00 ! FAB$B_ORG: 00 ! ! (1): 00 ! FAB$B_RAT: 00 ! ! (1): 00 ! FAB$B_RFM: 01 ! FAB$B_JOURNAL: 00 ! ! (1): 00 ! FAB$B_RU_FACILITY: 00 ! FABDEF$$_FILL_7: 0000 ! FAB$L_XAB: 00002338 ! FAB$L_NAM: 0012BA78 ! FAB$L_FNA: 00000494 ! FAB$L_DNA: 7FF25E30 ! FAB$B_FNS: 0FF ! FAB$B_DNS: 0A ! FAB$W_MRS: 0064 ! FAB$L_MRN: 000003E9 ! FAB$W_BLS: 0000 ! FAB$B_BKS: 00 ! FAB$B_FSZ: 00 ! FAB$L_DEV: 1C4D4108 ! FAB$L_SDC: 1C4D4108 ! FAB$W_GBC: 0000 ! FAB$B_ACMODES: 00 ! ! (1): 00 ! FAB$B_RCF: 00 ! ! (1): 00 ! FABDEF$$_FILL_9: 00000000 !LIO$UFOPEN\RAB ! RAB$B_BID: 01 ! RAB$B_BLN: 44 ! RAB$W_ISI: 0000 ! ! (1): 00 ! (2): 00 ! RAB$L_ROP: 00010612 ! ! (1): 12 ! (2): 06 ! (3): 01 ! (4): 00 ! ! (1): 12 ! RABDEF$$_FILL_3: 12 ! RAB$B_ROP1: 06 ! RAB$B_ROP2: 01 ! RAB$B_ROP3: 00 ! RAB$L_STS: 00000000 ! RAB$L_STV: 00000000 ! RAB$W_STV0: 0000 ! RAB$W_STV2: 0000 ! RAB$W_RFA ! (1): 0000 ! (2): 0000 ! (3): 0000 ! RAB$L_RFA0: 00000000 ! RAB$W_RFA4: 0000 ! RABDEF$$_FILL_4: 0000 ! RAB$L_CTX: 00000000 ! RABDEF$$_FILL_5: 0000 ! RAB$B_RAC: 01 ! RAB$B_TMO: 00 ! RAB$W_USZ: 0000 ! RAB$W_RSZ: 0000 ! RAB$L_UBF: 00000000 ! RAB$L_RBF: 00000000 ! RAB$L_RHB: 00000000 ! RAB$L_KBF: 0012B9C4 ! RAB$L_PBF: 0012B9C4 ! RAB$B_KSZ: 00 ! RAB$B_PSZ: 00 ! RAB$B_KRF: 00 ! RAB$B_MBF: 00 ! RAB$B_MBC: 00 ! RAB$L_BKT: 00000000 ! RAB$L_DCT: 00000000 ! RAB$L_FAB: 0012BA28 ! RAB$L_XAB: 00000000 Step !stepped to LIO$UFOPEN\%LINE 846 Listing from the DEBUGGER after $OPEN is executed: -------------------------------------------------- ex fab,rab !LIO$UFOPEN\FAB ! FAB$B_BID: 03 ! FAB$B_BLN: 50 ! FAB$W_IFI: 0005 ! ! (1): 05 ! (2): 00 ! FAB$L_FOP: 01200000 ! ! (1): 00 ! (2): 00 ! (3): 20 ! (4): 01 ! FAB$L_STS: 00010001 ! FAB$L_STV: 000001E0 ! FAB$L_ALQ: 00000012 ! FAB$W_DEQ: 0009 ! FAB$B_FAC: 22 ! ! (1): 22 ! FAB$B_SHR: 20 ! ! (1): 20 ! FAB$L_CTX: 00000000 ! FAB$B_RTV: 00 ! FAB$B_ORG: 00 ! ! (1): 00 ! FAB$B_RAT: 00 ! ! (1): 00 ! FAB$B_RFM: 01 ! FAB$B_JOURNAL: 00 ! ! (1): 00 ! FAB$B_RU_FACILITY: 00 ! FABDEF$$_FILL_7: 0000 ! FAB$L_XAB: 00002338 ! FAB$L_NAM: 0012BA78 ! FAB$L_FNA: 00000494 ! FAB$L_DNA: 7FF25E30 ! FAB$B_FNS: 0FF ! FAB$B_DNS: 0A ! FAB$W_MRS: 0064 ! FAB$L_MRN: 000003E9 ! FAB$W_BLS: 0200 ! FAB$B_BKS: 00 ! FAB$B_FSZ: 00 ! FAB$L_DEV: 1C4D4108 ! FAB$L_SDC: 1C4D4108 ! FAB$W_GBC: 0000 ! FAB$B_ACMODES: 00 ! ! (1): 00 ! FAB$B_RCF: 00 ! ! (1): 00 ! FABDEF$$_FILL_9: 00000000 !LIO$UFOPEN\RAB ! RAB$B_BID: 01 ! RAB$B_BLN: 44 ! RAB$W_ISI: 0000 ! ! (1): 00 ! (2): 00 ! RAB$L_ROP: 00010612 ! ! (1): 12 ! (2): 06 ! (3): 01 ! (4): 00 ! ! (1): 12 ! RABDEF$$_FILL_3: 12 ! RAB$B_ROP1: 06 ! RAB$B_ROP2: 01 ! RAB$B_ROP3: 00 ! RAB$L_STS: 00000000 ! RAB$L_STV: 00000000 ! RAB$W_STV0: 0000 ! RAB$W_STV2: 0000 ! RAB$W_RFA ! (1): 0000 ! (2): 0000 ! (3): 0000 ! RAB$L_RFA0: 00000000 ! RAB$W_RFA4: 0000 ! RABDEF$$_FILL_4: 0000 ! RAB$L_CTX: 00000000 ! RABDEF$$_FILL_5: 0000 ! RAB$B_RAC: 01 ! RAB$B_TMO: 00 ! RAB$W_USZ: 0000 ! RAB$W_RSZ: 0000 ! RAB$L_UBF: 00000000 ! RAB$L_RBF: 00000000 ! RAB$L_RHB: 00000000 ! RAB$L_KBF: 0012B9C4 ! RAB$L_PBF: 0012B9C4 ! RAB$B_KSZ: 00 ! RAB$B_PSZ: 00 ! RAB$B_KRF: 00 ! RAB$B_MBF: 00 ! RAB$B_MBC: 00 ! RAB$L_BKT: 00000000 ! RAB$L_DCT: 00000000 ! RAB$L_FAB: 0012BA28 ! RAB$L_XAB: 00000000 ================== +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+ ! The University of Trondheim ! Joern Yngve Dahl-Stamnes ! ! The Norwegian Institute of Technology ! System Manager ! ! Division of Physical Electronics ! ! ! N 7034 Trondheim, Norway ! ! !---------------------------------------+---------------------------! ! dahls%vax.elab.unit.uninett@tor.nta.no ! !------->>>>>>>> "t'nia stnatsnoc ,t'now selbairaV" <<<<<<<<------! +-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-+