Return to the Comm Tips
Here is a quick guide to setting up an ethernet line for IP
- Use the WRKHDWRSC *CMN command to get a list of communications resources on the screen
- Scroll through the list until you find "Ethernet port" in the description and make a note of the associated resource (CMNxx)
- Prompt the CRTLINETH command with F4
- Enter a name for the line in the line description field
- Enter the resource from step 2 in the resource name field
- Set the line speed and duplex parameters as required - if in doubt leave them as default
- Prompt the ADDTCPIFC command with F4
- Enter the line description from step 4
- Enter the ip address and subnet mask as required
- Type VRYCFG linedesc *LIN *ON
- Type STRTCPIFC ipaddres
/* 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) + RMTCPNAME(&RMTSYS) /* 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
[report a broken link by clicking here]