View previous topic :: View next topic |
Author |
Message |
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Thu Nov 04, 2004 11:27 am Post subject: How to retrieve TCP/IP address of machine? |
|
|
Hi,
I need a TCP/IP address of target machine. What are ways to get it? I tried NETSTAT command so far, but permission is denied. |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Thu Nov 04, 2004 11:49 am Post subject: |
|
|
nslookup xxx
ping -a xxx |
|
Back to top |
|
|
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Fri Nov 05, 2004 2:31 am Post subject: |
|
|
taltyman, here the result for
PING:
CS V1R4: Pinging host XXX.XXX.XXX.XXX
Unable to open RAW socket: EDC5111I Permission denied.
NSLOOKUP:
*** Can't find initialize address for server : No response from server
***
If there any other ways? |
|
Back to top |
|
|
Sreejith Intermediate
Joined: 02 Dec 2002 Posts: 155 Topics: 25 Location: N.Ireland
|
Posted: Fri Nov 05, 2004 5:43 am Post subject: |
|
|
Try this Rexx. I think I got this from this site only
Code: |
/* REXX */
CLEAR
SYSENV = SYSVAR('SYSENV')
VERS = SOCKET('VERSION')
INIT = SOCKET('INITIALISE','TCPINFO')
/* SAVE INIT RESULTS */
PARSE VAR INIT INIT_RC SUBTASKID MAXDESC SERVICE
HOSTID = SOCKET('GETHOSTID')
HOSTNAME = SOCKET('GETHOSTNAME')
DOMAIN = SOCKET('GETDOMAINNAME')
TERM = SOCKET('TERMINATE')
/* PARSE ======> ==========> ======> */
PARSE VAR HOSTID RETURN_CODE TCPADDR
PARSE VAR HOSTNAME RETURN_CODE TCPNAME
PARSE VAR DOMAIN RETURN_CODE TCPDOMAIN
FULLNAME = TCPNAME'.'TCPDOMAIN
SAY SYSENV
/* IF SYSENV = 'FORE' THEN 'CS'*/
SAY 'HOST ADDR =' TCPADDR
SAY 'HOST NAME =' TCPNAME
SAY 'DOMAIN =' TCPDOMAIN
SAY 'FULL NAME =' FULLNAME
IF SYSENV = 'BACK' THEN DO
SAY 'RETURN CODE =' INIT_RC
END
EXIT INIT_RC
|
|
|
Back to top |
|
|
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Fri Nov 05, 2004 6:55 am Post subject: |
|
|
Sreejith, it works fine on another machine, but fails on machine that I need:
FORE
HOST ADDR = ESUBTASKNOTACTIVE Subtask not active
HOST NAME = ESUBTASKNOTACTIVE Subtask not active
DOMAIN = ESUBTASKNOTACTIVE Subtask not active
Any ideas? |
|
Back to top |
|
|
taltyman JCL Forum Moderator
Joined: 02 Dec 2002 Posts: 310 Topics: 8 Location: Texas
|
Posted: Fri Nov 05, 2004 8:23 am Post subject: |
|
|
Is the target machine the MVS machine that you are logged on to or is it remote?
Is it a mainframe?
Is TCPIP running on it? |
|
Back to top |
|
|
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Sat Nov 06, 2004 9:30 am Post subject: |
|
|
taltyman,
1. It's a remote machine, I get in it via gateway, then I have TSO with standard ISPF staff.
2. I am sure it is.
3. I believe yes, but it seems I have no authority to TCPIP services.
The background of my question is that I would like to use FTP (e.g. for submitting jobs), but I don't know address of target machine. |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
|
Posted: Sat Nov 06, 2004 9:44 am Post subject: |
|
|
Alex,
Quote: | The background of my question is that I would like to use FTP (e.g. for submitting jobs), but I don't know address of target machine. |
Something does not sound right here. Why do you want to submit jobs on a target machine of which you don't know the IP address. If you are authorized to submit jobs then why don't you ask the system people for the IP address? From your earlier post of yours , it seems that you don't have permission to issue the commands. Are you trying get into a system via a back door?
kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Sat Nov 06, 2004 10:42 am Post subject: |
|
|
kolusu, I'm authorized user and I'm permited to submit jobs under TSO/ISPF. I'm not trying to use a back door or something. You are right, I really can ask system people, but in my case it's a long story. I was looking for a way to retreive it by my own. Now I see that in this case the short way is to ask system folk. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Nov 06, 2004 3:18 pm Post subject: |
|
|
if you have read authority to the tcpip task's data sets, you could just look in there. One way to find that info is to use TASID to find the tcpip job jame, and look at its allocations. one will contain an allocation to something probably named (or with a member named) ...profile or tcpdata or similar. Look in that file. That is where the local ip address is configured. |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Sat Nov 06, 2004 3:22 pm Post subject: |
|
|
also... try ftp from to 127.0.0.1 from you tso id. If you can't do it, then the whole excecise is moot |
|
Back to top |
|
|
Alex Beginner
Joined: 31 Aug 2004 Posts: 12 Topics: 4
|
Posted: Mon Nov 08, 2004 4:57 am Post subject: |
|
|
semigeezer, I tried FTP: EDC5111I Permission denied. |
|
Back to top |
|
|
|
|