MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to retrieve TCP/IP address of machine?

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics
View previous topic :: View next topic  
Author Message
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Thu Nov 04, 2004 11:27 am    Post subject: How to retrieve TCP/IP address of machine? Reply with quote

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
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Thu Nov 04, 2004 11:49 am    Post subject: Reply with quote

nslookup xxx
ping -a xxx
Back to top
View user's profile Send private message
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Fri Nov 05, 2004 2:31 am    Post subject: Reply with quote

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
View user's profile Send private message
Sreejith
Intermediate


Joined: 02 Dec 2002
Posts: 155
Topics: 25
Location: N.Ireland

PostPosted: Fri Nov 05, 2004 5:43 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Yahoo Messenger
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Fri Nov 05, 2004 6:55 am    Post subject: Reply with quote

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
View user's profile Send private message
taltyman
JCL Forum Moderator
JCL Forum Moderator


Joined: 02 Dec 2002
Posts: 310
Topics: 8
Location: Texas

PostPosted: Fri Nov 05, 2004 8:23 am    Post subject: Reply with quote

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
View user's profile Send private message
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Sat Nov 06, 2004 9:30 am    Post subject: Reply with quote

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
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Sat Nov 06, 2004 9:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Sat Nov 06, 2004 10:42 am    Post subject: Reply with quote

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. Smile
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Nov 06, 2004 3:18 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Nov 06, 2004 3:22 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Alex
Beginner


Joined: 31 Aug 2004
Posts: 12
Topics: 4

PostPosted: Mon Nov 08, 2004 4:57 am    Post subject: Reply with quote

semigeezer, I tried FTP: EDC5111I Permission denied.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Other Technical Topics All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group