|
This program has been basically tested. It uses an *ANYNW connection. It works if run on both machines required to be connected. All you need is the hostname and IP addresss of the two machines. For example on Machine A you would need the name and IP address of Machine B, and on Machine B you'd need the name and IP address of Machine A. It has no error checking in it (testing for duplicate entries for examples) and a number of other potential variables could be unabled (modes, control points, customising distribution queues). But for most people's quick and dirty purposes it'll work. Regards James Turnbull Technical Consultant Kaz Computer Services 6/66 Wentworth Avenue Surrey Hills, 2010. Sydney, NSW AUSTRALIA P.S. This code is offered in the public domain and neither I nor my employer take any responsibility for any damage, trouble, strife or natural disasters caused through its use. /*********************************************************************/ /* QUICK AND DIRTY SNADS CONFIGURATION PROGRAM USING ANYNET */ /*********************************************************************/ PGM PARM(&RMTSYS &IPADDR) /* DECLARE VARIABLES */ DCL VAR(&RMTSYS) TYPE(*CHAR) LEN(10) DCL VAR(&IPADDR) TYPE(*CHAR) LEN(25) DCL VAR(&RMTSYSA) TYPE(*CHAR) LEN(50) /* CREATE HOST TABLE NAME */ CHGVAR VAR(&RMTSYSA) VALUE(&RMTSYS *TCAT + '.APPN.SNA.IBM.COM') /* ADD HOST TABLE ENTRY */ ADDTCPHTE INTNETADR(&IPADDR) HOSTNAME((&RMTSYSA)) + TEXT(&RMTSYS) /* CREATE APPC CONTROLLER */ CRTCTLAPPC CTLD(&RMTSYS) LINKTYPE(*ANYNW) + RMTNETID(RMTNET) RMTCPNAME(RMTCP) /* CREATE APPC DEVICE */ CRTDEVAPPC DEVD(&RMTSYS) RMTLOCNAME(&RMTSYS) CTL(&RMTSYS) /* ADD DIRECTORY ENTRY FOR REMOTE SYSTEM */ ADDDIRE USRID(*ANY &RMTSYS) USRD('*ANY at ' || + &RMTSYS) USER(*NONE) SYSNAME(&RMTSYS) /* ADD CONFIGURATION LIST ENTRY */ ADDCFGLE TYPE(*APPNRMT) APPNRMTE((&RMTSYS *NETATR + *NETATR &RMTSYS)) /* ADD DISTRIBUTION QUEUE */ ADDDSTQ DSTQ(&RMTSYS) RMTLOCNAME(&RMTSYS) /* ADD DISTRIBUTION ROUTE */ ADDDSTRTE SYSNAME(&RMTSYS) FAST(&RMTSYS) + STATUS(&RMTSYS) DATAHIGH(&RMTSYS) + DATALOW(&RMTSYS) TEXT('Route for '|| + &RMTSYS) /* VARY ON CONTROLLER & DEVICE */ VRYCFG CFGOBJ(&RMTSYS) CFGTYPE(*CTL) STATUS(*ON) ENDPGM: ENDPGM +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.