Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to change writer on a remote system AS400 ?

Status
Not open for further replies.

francoisf

Programmer
Feb 11, 2004
30
0
0
FR
Hi !
I've to change a writer on a remote system AS400 from another AS400.

I can do it using TELNET command and then using this command : CHGWTR WTR(PRT1) FORMTYPE(*SAME *NOMSG)
But i would like to do it automatically by program.

I try use this command : AREXEC CMD('CHGWTR WTR(PRT1) FORMTYPE(*SAME *NOMSG)') RMTLOCNAME(RemoteSysName...
but i got a message telling my to check my controler and my connection.
I don't understand why i can connect by TELNET command and yet the AREXEC command doesn't work ...

I'm a beginner and i don't know if a solution exists for my problem.

Thanks if you can help.







 
francoisf,

I'm not going to be much help as I had never seen the AREXEC command before but prompting it and hitting help told me the following:

AREXEC is a SNA command. TELNET is a TCP/IP command.

Under SNA you need a communications controler, device description and line description (if I remember correctly). You are trying to mix apples and oranges here. I may be off base here but I would think you could put together a CLP to run the TELNET command then change the writer in the CLP.

HTH,
MdnghtPgmr
 
Francoisf,

IMHO you can do what MdnghtPgmr said or use also the RUNRMTCMD command that does the job over SNA and/or TCP/IP network as well.

HTH
 
Thank you,

i tryed both,
The TELNET command has to be run in interactive job and i've to change my writer in batch job ...

I tryed this command :
RUNRMTCMD CMD('CHGWTR WTR(PRT1) FORMTYPE(*SAME *NOMSG)') RMTLOCNAME(CHENOVE *IP) RMTUSER(QSECOFR) RMTPWD (****)
but i got this message :
"A remote host refused an attempted connect operation."

when i try this :
RUNRMTCMD CMD('CHGWTR WTR(PRT1) FORMTYPE(*SAME *NOMSG)') RMTLOCNAME(CHENOVE *SNA) RMTUSER(QSECOFR) RMTPWD (****)

a message tell me that waittime is too short, or tell me to check controler state and connexion state ...

If you have any idea, thank you to tell me about it !
Thanks.

 
Make sure the Host Server for remote commands is running on the AS400 source. Issue the command STRHOSTSVR SERVER(*RMTCMD) (will display a message already started if it arises)

Try also just starting the rexec server:
STRTCPSVR SERVER(*REXEC) (will display a message already started).

Could be also an unknown or wrong remote name or wrong password or both.
Give it a try and issue the command RUNRMTCMD ... RMTLOCNAME(IP_Address *IP) instead.
HTH
 
I didn't manage to connect...
Is there any object to configure on remote system ?
Any idea will be welcome !

Thank you !
 
Verify SNA connectivity to the remote system with the APING command.

If the systems are on different networks, (DSPNETA to see "Local Network ID"), you have to use the network name and the system name for both APING and RUNRMTCMD.

If the remote system (BOB) has "Local Network ID" of APPN1, and the local system is different, the APING command needs to look something like:
APING RMTLOCNAME(APPN1.BOB)
Likewise for the RUNRMTCMD...

If APING doesn't work... you have lots of configuration ahead of you...

iSeriesRules
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top