%TITLE "NETACP - Exemple de QIO sur NET:" %IDENT "V01.01" %SBTTL "Definition des datas" PROGRAM NETACP ! ! Ce programme de demonstration de l'interface QIO avec NET: ! donne la liste des noeuds unreachables et celle des noeuds ayant ! des liens actifs avec le noeud courant. ! ! Il doit etre linke avec un objet contenant la definition ! des symboles NFB. On peut le faire de la facon suivante : ! ! $ TYPE NFBDEF.MAR ! .LIBRARY "SYS$LIBRARY:LIB" ! $NFBDEF ! .END ! $ MACRO NFBDEF ! $ BASIC NETACP ! $ LINK NETACP,NFBDEF ! OPTION TYPE = EXPLICIT SET NO PROMPT ! Definition des structures NFB RECORD NFBREC VARIANT CASE BYTE NFB$B_FCT ! Function code BYTE NFB$B_FLAGS ! Operation flags BYTE NFB$B_DATABASE ! Target database BYTE NFB$B_OPER ! Match operator LONG NFB$L_SRCH_KEY ! Primary search key LONG NFB$L_SRCH2_KEY ! Secondary search key BYTE NFB$B_OPER2 ! Secondary match operator BYTE NFB$B_MBZ1 ! Must be zero WORD NFB$W_CELL_SIZE ! Cell size LONG NFB$L_FLDID (1% TO 64%) ! Request codes CASE STRING NFB_REC = 272% END VARIANT END RECORD RECORD NFBKEY VARIANT CASE LONG NFBKEY$L_P4_COUNT LONG NFBKEY$L_SRCH LONG NFBKEY$L_SRCH2 WORD NFBKEY$B_START BYTE NFBKEY$B_CTX (1% TO 64%) CASE STRING NFB_KEY = 78% END VARIANT END RECORD EXTERNAL LONG CONSTANT & ! & ! values for NFB$B_FCT = Function code & ! & NFB$C_DECLNAME ! Declare name & ,NFB$C_DECLOBJ ! Declare object & ,NFB$C_DECLSERV ! Declare server process & ,NFB$C_LOGEVENT ! Log a network event & ,NFB$C_READEVENT ! Read raw event queue (EVL) & ,NFB$C_FC_DELETE ! Delete database entry & ,NFB$C_FC_SHOW ! Return specified values & ,NFB$C_FC_SET ! Set/modify field value & ,NFB$C_FC_CLEAR ! Clear field value & ,NFB$C_FC_ZERCOU ! Zero [read] counters & ! & ! values for NFB$B_FLAGS = Operation flags & ! & ,NFB$M_ERRUPD ! Update context, even in error & ,NFB$M_MULT ! Process as many entries in P4 & ,NFB$M_NOCTX ! Don't update context & ! & ! values for NFB$B_DATABASE = Target database & ! (excluding event logging, PSI, X25 and X29 databases) & ! & ,NFB$C_DB_AJI ! Adjency & ,NFB$C_DB_ARI ! Area & ,NFB$C_DB_CRI ! Circuit & ,NFB$C_DB_LLI ! Logicals links & ,NFB$C_DB_LNI ! Local node & ,NFB$C_DB_NDI ! Common node & ,NFB$C_DB_OBI ! Object & ,NFB$C_DB_PLI ! Line & ,NFB$C_DB_SDI ! Service & ,NFB$C_DB_SPI ! Server process & ! & ! values for NFB$B_OPER or NBF$B_OPER2 = Match operator & ! & ,NFB$C_OP_EQL ! Search key EQL database entry & ,NFB$C_OP_GTRU ! Search key GTR database entry & ,NFB$C_OP_LSSU ! Search key LES database entry & ,NFB$C_OP_NEQ ! Search key NEQ database entry & ! & ! Generic field identifiers & ! & ,NFB$C_ENDOFLIST ! Used to terminate field id & ,NFB$C_WILDCARD ! Field id for match all & ,NFB$C_CTX_SIZE ! Length of context in p2 buffer& ! & ! Error code returned in second IOSB longword for SS_ILLCNTRFUNC& ! & ,NFB$_ERR_FCT ! Illegal NFB$B_FCT value & ,NFB$_ERR_DB ! Illegal NFB$B_DATABASE value & ,NFB$_ERR_P1 ! Buffer P1 is invalid & ,NFB$_ERR_P2 ! Buffer P2 is invalid & ,NFB$_ERR_P3 ! Buffer P3 is invalid & ,NFB$_ERR_P4 ! Buffer P4 is invalid & ,NFB$_ERR_P5 ! Buffer P5 is specified & ,NFB$_ERR_P6 ! Buffer P6 is specified & ,NFB$_ERR_CELL ! Illegal NFB$B_CELL value & ,NFB$_ERR_OPER ! Illegal NFB$B_OPER value & ,NFB$_ERR_SRCH ! Illegal NFB$L_SRCH_KEY fid & ,NFB$_ERR_SRCH2 ! Illegal NFB$L_SRCH2_KEY fid & ,NFB$_ERR_OPER2 ! Illegal NFB$B_OPER2 value & ,NFB$_ERR_FLAGS ! Reserved bit set in NFB$B_FLAG& !---------------------------------------------------------------& ! values for : & ! NFB$L_SRCH_KEY = Primary search key & ! NFB$L_SRCH2_KEY = Secondary search key & ! NFB$L_FLDID = Request codes & !---------------------------------------------------------------& ! & ! values if NFB$B_DATABASE = NFB$C_DB_NDI : Common node & ! & ! Boolean & ,NFB$C_NDI_LCK ! Writable fields locked & ,NFB$C_NDI_LOO ! CNF is for loopback node & ,NFB$C_NDI_REA ! Node is reachable & ! Long & ,NFB$C_NDI_TAD ! Transformed address & ,NFB$C_NDI_CTA ! Absolute time for counter & ,NFB$C_NDI_ADD ! Node address (0 for local) & ,NFB$C_NDI_CTI ! Counter timer & ,NFB$C_NDI_ACL ! Active links & ,NFB$C_NDI_DEL ! Delay & ,NFB$C_NDI_DTY ! Destination type & ,NFB$C_NDI_DCO ! Destination cost & ,NFB$C_NDI_DHO ! Destination hops & ,NFB$C_NDI_SDV ! Service device & ,NFB$C_NDI_CPU ! CPU type & ,NFB$C_NDI_STY ! Software type & ,NFB$C_NDI_DAD ! Dump address & ,NFB$C_NDI_DCT ! Dump count & ,NFB$C_NDI_OHO ! Host & ,NFB$C_NDI_IHO ! Host & ,NFB$C_NDI_ACC ! Access switch (inboud, ...) & ,NFB$C_NDI_PRX ! Obsolete & ,NFB$C_NDI_NND ! Next node address & ,NFB$C_NDI_SNV ! Service node version & ,NFB$C_NDI_INB ! Async line - Inbound node type& ! String & ,NFB$C_NDI_COL ! Collating field & ,NFB$C_NDI_HAC ! Node address/loop linename & ,NFB$C_NDI_CNT ! Counters & ,NFB$C_NDI_NNA ! Name & ,NFB$C_NDI_SLI ! Service line & ,NFB$C_NDI_SPA ! Service password & ,NFB$C_NDI_LOA ! Load file & ,NFB$C_NDI_SLO ! Secondary loader & ,NFB$C_NDI_TLO ! Tertiary loader & ,NFB$C_NDI_SID ! Software id & ,NFB$C_NDI_DUM ! Dump file & ,NFB$C_NDI_SDU ! Secondary dumper & ,NFB$C_NDI_NLI ! Loopback line & ,NFB$C_NDI_DLI ! Destination line & ,NFB$C_NDI_PUS ! Priv user & ,NFB$C_NDI_PAC ! Priv account & ,NFB$C_NDI_PPW ! Priv password & ,NFB$C_NDI_NUS ! Non-priv user & ,NFB$C_NDI_NAC ! Non-priv account & ,NFB$C_NDI_NPW ! Non-priv password & ,NFB$C_NDI_RPA ! Receive password & ,NFB$C_NDI_TPA ! Transmit password & ,NFB$C_NDI_DFL ! Diagnostics load file & ,NFB$C_NDI_HWA ! Hardware NI address & ,NFB$C_NDI_LPA ! Loop assistant NI address & ,NFB$C_NDI_NNN ! Next node name to destination & ,NFB$C_NDI_LAA ! ?? & ,NFB$C_NDI_LAP ! ?? & ! & ! values if NFB$B_DATABASE = NFB$C_DB_LNI : Local node & ! & ! Boolean & ,NFB$C_LNI_LCK ! Writable fields are locked & ,NFB$C_LNI_ALI ! Alias inbound enabled & ! Long & ,NFB$C_LNI_ADD ! Address & ,NFB$C_LNI_ACL ! Total active links & ,NFB$C_LNI_ITI ! Incoming timer & ,NFB$C_LNI_OTI ! Outgoing timer & ,NFB$C_LNI_STA ! State & ,NFB$C_LNI_MLK ! Maximum links & ,NFB$C_LNI_DFA ! Delay factor & ,NFB$C_LNI_DWE ! Delay weight & ,NFB$C_LNI_IAT ! Inactivity timer & ,NFB$C_LNI_RFA ! Retransmit factor & ,NFB$C_LNI_ETY ! Executor type & ,NFB$C_LNI_RTI ! Routing timer & ,NFB$C_LNI_RSI ! Routing suppression timer & ,NFB$C_LNI_SAD ! Subaddress (2 words) & ,NFB$C_LNI_MAD ! Maximum address & ,NFB$C_LNI_MLN ! Maximum lines & ,NFB$C_LNI_MCO ! Maximum cost & ,NFB$C_LNI_MHO ! Maximum hops & ,NFB$C_LNI_MVI ! Maximum visits & ,NFB$C_LNI_MBU ! Maximum buffer & ,NFB$C_LNI_BUS ! Forwarding buffer size & ,NFB$C_LNI_LPC ! Loop count & ,NFB$C_LNI_LPL ! Loop length & ,NFB$C_LNI_LPD ! Loop data type & ,NFB$C_LNI_DAC ! Default access switch & ,NFB$C_LNI_DPX ! Default proxy switch & ,NFB$C_LNI_PIQ ! Pipeline quota & ,NFB$C_LNI_LPH ! Loop help type & ,NFB$C_LNI_BRT ! Broadcast routing timer & ,NFB$C_LNI_MAR ! Maximum areas & ,NFB$C_LNI_MBE ! Maximum non routers on NI & ,NFB$C_LNI_MBR ! Maximum routers on NI & ,NFB$C_LNI_AMC ! Area maximum cost & ,NFB$C_LNI_AMH ! Area maximum hops & ,NFB$C_LNI_SBS ! Segment buffer size & ,NFB$C_LNI_ALA ! Alias node address & ,NFB$C_LNI_ALM ! Alias maximum links & ! String & ,NFB$C_LNI_COL ! Collating field & ,NFB$C_LNI_NAM ! Local node name & ,NFB$C_LNI_CNT ! Counters & ,NFB$C_LNI_IDE ! Identification & ,NFB$C_LNI_MVE ! Management version & ,NFB$C_LNI_NVE ! NSP version & ,NFB$C_LNI_RVE ! Routing version & ,NFB$C_LNI_PHA ! Physical NI address & ! & ! values if NFB$B_DATABASE = NFB$C_DB_OBI : Object & ! & ! Boolean & ,NFB$C_OBI_LCK ! Writable fields are locked & ,NFB$C_OBI_SET ! Set QIO has modified the CNF & ,NFB$C_OBI_ALO ! Alias outgoing enabled & ,NFB$C_OBI_ALI ! Alias incoming enabled & ! Long & ,NFB$C_OBI_LPR ! Low order privileges & ,NFB$C_OBI_HPR ! Hight order privileges & ,NFB$C_OBI_UCB ! Owner's UCB address & ,NFB$C_OBI_CHN ! Owner's channel & ,NFB$C_OBI_NUM ! Number & ,NFB$C_OBI_PID ! Process ID & ,NFB$C_OBI_PRX ! Proxy login switch & ! String & ,NFB$C_OBI_COL ! Collating field & ,NFB$C_OBI_ZNA ! Zero obj+name identifier & ,NFB$C_OBI_SFI ! Parsed file id & ,NFB$C_OBI_IAC ! Default inbound access string & ,NFB$C_OBI_NAM ! Name & ,NFB$C_OBI_FID ! File id & ,NFB$C_OBI_USR ! User id & ,NFB$C_OBI_ACC ! Account & ,NFB$C_OBI_PSW ! Password & ! & ! values if NFB$B_DATABASE = NFB$C_DB_CRI : Circuit & ! & ! Boolean & ,NFB$C_CRI_LCK ! Writable fields are locked & ,NFB$C_CRI_SER ! Service enabled & ,NFB$C_CRI_BLK ! Blocking & ,NFB$C_CRI_DLM ! X25 datalink & ! Long & ,NFB$C_CRI_OWPID ! Owner PID if in service state & ,NFB$C_CRI_CTA ! Absolute due time for counters& ,NFB$C_CRI_SRV ! Service substate qalifier & ,NFB$C_CRI_STA ! State & ,NFB$C_CRI_SUB ! Substate & ,NFB$C_CRI_LCT ! Counter timer & ,NFB$C_CRI_PNA ! Adjacewnt node address & ,NFB$C_CRI_BLO ! Partner's receive block size & ,NFB$C_CRI_COS ! Cost & ,NFB$C_CRI_HET ! Hello timer & ,NFB$C_CRI_LIT ! Listen timer & ,NFB$C_CRI_MRC ! Maximum recalls & ,NFB$C_CRI_RCT ! Recall timer & ,NFB$C_CRI_POL ! Polling state & ,NFB$C_CRI_PLS ! Polling substate & ,NFB$C_CRI_USE ! Usage & ,NFB$C_CRI_TYP ! Type & ,NFB$C_CRI_CHN ! X25 channel & ,NFB$C_CRI_MBL ! Maximum block & ,NFB$C_CRI_MWI ! Maximum window & ,NFB$C_CRI_TRI ! Tributary & ,NFB$C_CRI_BBT ! Babble timer & ,NFB$C_CRI_TRT ! Transmit timer & ,NFB$C_CRI_MRB ! Maximum receive buffers & ,NFB$C_CRI_MTR ! Maximum transmits & ,NFB$C_CRI_ACB ! Active base & ,NFB$C_CRI_ACI ! Active increment & ,NFB$C_CRI_IAB ! Inactive base & ,NFB$C_CRI_IAI ! Inactive increment & ,NFB$C_CRI_IAT ! Inactive threshold & ,NFB$C_CRI_DYB ! Dying base & ,NFB$C_CRI_DYI ! Dying increment & ,NFB$C_CRI_DYT ! Dying threshold & ,NFB$C_CRI_DTH ! Dead threshold & ,NFB$C_CRI_MST ! Maintenance mode state (0=on) & ,NFB$C_CRI_XPT ! Transport protocol to use & ,NFB$C_CRI_MRT ! Maximum routers on this NI & ,NFB$C_CRI_RPR ! Router priority & ,NFB$C_CRI_DRT ! Designated router on NI & ,NFB$C_CRI_VER ! Verification enabled & ! String & ,NFB$C_CRI_COL ! Collated field & ,NFB$C_CRI_NAM ! Circuit name & ,NFB$C_CRI_VMSNAM ! Device name in VMS format & ,NFB$C_CRI_CHR ! Buffer for startup control QIO& ,NFB$C_CRI_CNT ! Counters & ,NFB$C_CRI_P2P ! Line's phase II partner name & ,NFB$C_CRI_LOO ! Loopback name & ,NFB$C_CRI_PNN ! Adjacent node name & ,NFB$C_CRI_NUM ! Call number & ,NFB$C_CRI_DTE ! DTR & ,NFB$C_CRI_DEVNAM ! Device name (VMS) with unit & ,NFB$C_CRI_NET ! Network name & ! & ! values if NFB$B_DATABASE = NFB$C_DB_PLI : Line & ! & ! Boolean & ,NFB$C_PLI_LCK ! Writable fields are locked & ,NFB$C_PLI_SER ! Service & ,NFB$C_PLI_DUP ! Half duplex & ,NFB$C_PLI_CON ! Loopback controller & ,NFB$C_PLI_CLO ! Internal clock mode & ,NFB$C_PLI_SWI ! Async line switch & ,NFB$C_PLI_HNG ! Async line hangup & ! Long & ,NFB$C_PLI_CTA ! Absolute time for counters & ,NFB$C_PLI_STA ! State & ,NFB$C_PLI_SUB ! Substate & ,NFB$C_PLI_LCT ! Counter timer & ,NFB$C_PLI_PRO ! Protocol & ,NFB$C_PLI_STI ! Service timer & ,NFB$C_PLI_HTI ! Holdback timer & ,NFB$C_PLI_MBL ! Maximum block & ,NFB$C_PLI_MRT ! Maximum retransmit & ,NFB$C_PLI_MWI ! Maximum window & ,NFB$C_PLI_SLT ! Scheduling timer & ,NFB$C_PLI_DDT ! Dead timer & ,NFB$C_PLI_DLT ! Delay timer & ,NFB$C_PLI_SRT ! Stream timer & ,NFB$C_PLI_BFN ! Receive buffers & ,NFB$C_PLI_BUS ! Bufsiz used for line & ,NFB$C_PLI_PLVEC ! PLVEC id & ,NFB$C_PLI_RTT ! Retransmit timer & ,NFB$C_PLI_MOD ! X25 mode & ,NFB$C_PLI_LPC ! Loop count & ,NFB$C_PLI_LPL ! Loop length & ,NFB$C_PLI_LPD ! Loop data type & ,NFB$C_PLI_EPT ! Ethernet protocol type & ,NFB$C_PLI_LNS ! Async line speed & ,NFB$C_PLI_BFS ! Line buffer size & ,NFB$C_PLI_TPI ! Transmit pipeline & ! String & ,NFB$C_PLI_COL ! Collating field & ,NFB$C_PLI_NAM ! Line name & ,NFB$C_PLI_VMSNAM ! Device name in VMS format & ,NFB$C_PLI_CHR ! Set mode QIO line char buffer & ,NFB$C_PLI_CNT ! Counters & ,NFB$C_PLI_MCD ! Filespec for microcode dump & ,NFB$C_PLI_HWA ! NI hardware address & ,NFB$C_PLI_DEVNAM ! Device name (VMS) with unit & ,NFB$C_PLI_NET ! Network name & ! & ! values if NFB$B_DATABASE = NFB$C_DB_LLI : Logicals links & ! & ! Boolean & ,NFB$C_LLI_LCK ! Writable fields are locked & ! Long & ,NFB$C_LLI_DLY ! Round trip delay time & ,NFB$C_LLI_STA ! State & ,NFB$C_LLI_LLN ! Local link number & ,NFB$C_LLI_RLN ! Remote link number & ,NFB$C_LLI_PNA ! Partner's node address & ,NFB$C_LLI_PID ! External PID & ,NFB$C_LLI_IPID ! Internal PID & ,NFB$C_LLI_XWB ! Pointer to XWB & ,NFB$C_LLI_CNT ! Counters & ! String & ,NFB$C_LLI_COL ! Collating field & ,NFB$C_LLI_USR ! Username & ,NFB$C_LLI_PRC ! Process name & ,NFB$C_LLI_PNN ! Partner's node name & ,NFB$C_LLI_RID ! Partner's pid & ! & ! values if NFB$B_DATABASE = NFB$C_DB_SPI : Server process & ! & ! Boolean & ,NFB$C_SPI_LCK ! Writable fields are locked & ,NFB$C_SPI_PRL ! Proxy flags at start of server& ! Long & ,NFB$C_SPI_PID ! Server PID & ,NFB$C_SPI_IRP ! IRP of waiting DECLSERV QIO & ,NFB$C_SPI_CHN ! Channel associated with QIO & ,NFB$C_SPI_RNA ! Remote node address & ! String & ,NFB$C_SPI_COL ! Collating field & ,NFB$C_SPI_ACS ! ACS used to start server & ,NFB$C_SPI_RID ! Remote user id at start & ,NFB$C_SPI_SFI ! Last SFI given to server & ,NFB$C_SPI_NCB ! Last NBC given to server & ,NFB$C_SPI_PNM ! Last process name & ! & ! values if NFB$B_DATABASE = NFB$C_DB_AJI : Adjency & ! & ! Boolean & ,NFB$C_AJI_LCK ! Writable fields are locked & ,NFB$C_AJI_REA ! Reachable & ,NFB$C_AJI_RRA ! ????? & ! Long & ,NFB$C_AJI_ADD ! Node address & ,NFB$C_AJI_TYP ! Node type & ,NFB$C_AJI_LIT ! Listen timer for this adjency & ,NFB$C_AJI_BLO ! Partner's block size & ,NFB$C_AJI_RPR ! Partner's router prio on NI & ! String & ,NFB$C_AJI_COL ! Collating fields & ,NFB$C_AJI_NNA ! Node name & ,NFB$C_AJI_CIR ! Circuit name & ! & ! values if NFB$B_DATABASE = NFB$C_DB_SDI : Service & ! & ! Boolean & ,NFB$C_SDI_LCK ! Writable fields are locked & ! Long & ,NFB$C_SDI_SUB ! Service substate & ,NFB$C_SDI_PID ! PID of owner & ! String & ,NFB$C_SDI_COL ! Collating field & ,NFB$C_SDI_CIR ! Circuit name & ,NFB$C_SDI_PHA ! Service physical address & ,NFB$C_SDI_PRC ! Name of process & ! & ! values if NFB$B_DATABASE = NFB$C_DB_ARI : Area & ! & ! Boolean & ,NFB$C_ARI_LCK ! Writable fields are locked & ,NFB$C_ARI_REA ! Node is reachable & ! Long & ,NFB$C_ARI_ADD ! Address & ,NFB$C_ARI_DCO ! Destination cost & ,NFB$C_ARI_DHO ! Destination hops & ,NFB$C_ARI_NND ! Next node address & ! String & ,NFB$C_ARI_COL ! Collating field & ,NFB$C_ARI_DLI ! Circuit used & ! Et un IOSB standard RECORD IOSB WORD STAT_IOSB WORD LGR_IOSB LONG DATA_IOSB END RECORD MAP (WORK) & LONG STAT ! VMS status & ,LONG BUF_LEN ! Buffer return len & ,WORD CHANNEL ! NET channel & ,NFBREC NFB ! NFB & ,NFBKEY NFK ! NFB keys & ,IOSB IOSB ! IOSB & ! Buffer pour retour reponse NETACP MAP (BUF) & STRING BUF = 512% ! Return buffer & MAP (BUF) & WORD BUF1_NODE_NAME_LEN ! Node name len & ,STRING BUF1_NODE_NAME = 127% ! Node name & DECLARE & STRING NODE ! Node name ! Constantes externes EXTERNAL WORD CONSTANT & IO$_ACPCONTROL & EXTERNAL LONG CONSTANT & SS$_NORMAL & ,SS$_ENDOFFILE & ! Fonctions externes EXTERNAL LONG FUNCTION SYS$QIOW & (LONG BY VALUE ! Event flag number & ,WORD BY VALUE ! Channel number & ,WORD BY VALUE ! Function code & ,IOSB BY REF ! IOSB & ,LONG BY REF ! AST ADR & ,LONG BY VALUE ! AST PARAM & ,ANY ! P1 & ,ANY ! P2 & ,ANY ! P3 & ,ANY ! P4 & ,ANY ! P5 & ,ANY) ! P6 & EXTERNAL LONG FUNCTION SYS$ASSIGN & (STRING BY DESC ! Device name & ,WORD BY REF ! Channel & ,LONG BY VALUE ! Access mode & ,STRING BY DESC) ! Mailbox name & %SBTTL "Initialisations" ! Assigner un canal sur NETACP STAT = SYS$ASSIGN ("_NET:",CHANNEL,,) CALL LIB$STOP (STAT BY VALUE) UNLESS (STAT AND 1%) ! Init des structures NFB NFB::NFB$B_FCT = NFB$C_FC_SHOW ! Commande SHOW NFB::NFB$B_FLAGS = NFB$M_MULT ! Retours multiples NFB::NFB$B_DATABASE = NFB$C_DB_NDI ! Common node database NFB::NFB$L_FLDID (1%) = NFB$C_NDI_NNA ! Renvoyer nom noeud NFB::NFB$L_FLDID (2%) = NFB$C_ENDOFLIST ! et c'est tout NFB::NFB$L_SRCH2_KEY = 0% NFB::NFB$B_OPER2 = 0% NFB::NFB$B_MBZ1 = 0% NFB::NFB$W_CELL_SIZE = 0% ! ! Recherche noeud reacheable, operateur NOT EQUAL => unreachable ! NFB::NFB$L_SRCH_KEY = NFB$C_NDI_REA NFB::NFB$B_OPER = NFB$C_OP_NEQ ! Init contexte recherche NFK::NFBKEY$L_P4_COUNT = 0% NFK::NFBKEY$L_SRCH = 1% NFK::NFBKEY$L_SRCH2 = 0% NFK::NFBKEY$B_START = 0% GOSUB EXEC_QIO ! Lire 1er bloc UNTIL IOSB::STAT_IOSB = SS$_ENDOFFILE ! Vider le buffer UNTIL BUF_LEN = 0% ! Choper le nom de noeud NODE = LEFT(BUF1_NODE_NAME,BUF1_NODE_NAME_LEN) ! Calculer la longueur de l'element BUF_LEN = BUF_LEN - (2% + BUF1_NODE_NAME_LEN) ! Virer l'element courant BUF = RIGHT(BUF,BUF1_NODE_NAME_LEN+3%) ! Editer le nom de noeud PRINT NODE+" is currently unreachable" NEXT GOSUB EXEC_QIO NEXT ! ! Recherche noeuds avec active links <> 0 ! NFB::NFB$B_OPER = NFB$C_OP_NEQ NFB::NFB$L_SRCH_KEY = NFB$C_NDI_ACL ! Init contexte recherche NFK::NFBKEY$L_P4_COUNT = 0% NFK::NFBKEY$L_SRCH = 0% NFK::NFBKEY$L_SRCH2 = 0% NFK::NFBKEY$B_START = 0% GOSUB EXEC_QIO UNTIL IOSB::STAT_IOSB = SS$_ENDOFFILE ! On va encore epuiser le buffer UNTIL BUF_LEN = 0% ! Idem precedement mais avec active links NODE = LEFT(BUF1_NODE_NAME,BUF1_NODE_NAME_LEN) BUF_LEN = BUF_LEN - (2% + BUF1_NODE_NAME_LEN) BUF = RIGHT(BUF,BUF1_NODE_NAME_LEN+3%) PRINT NODE+" is currently linked with local node" NEXT GOSUB EXEC_QIO NEXT EXIT PROGRAM SS$_NORMAL %SBTTL "Execution de la QIO et test code retour" EXEC_QIO: ! Demander (poliment) la reponse a l'ACP STAT = SYS$QIOW (, ! EVF & CHANNEL, ! CANAL & IO$_ACPCONTROL, ! FCT & IOSB, ! IOSB & , ! ASTADR & , ! ASTPRN & NFB::NFB_REC BY DESC, ! P1 & NFK::NFB_KEY BY DESC, ! P2 & BUF_LEN BY REF, ! P3 & BUF BY DESC, ! P4 & , ! P5 & ) ! P6 & ! Le lancement de la QIO aurait il foire ?? CALL LIB$STOP (STAT BY VALUE) UNLESS (STAT AND 1%) ! La demande est elle correcte ?? CALL LIB$STOP (IOSB::STAT_IOSB BY VALUE) & UNLESS (IOSB::STAT_IOSB AND 1%) & IF IOSB::STAT_IOSB <> SS$_ENDOFFILE & RETURN END PROGRAM