Page 1 of 1

Rexx to know the Hostid of my mainframe

PostPosted: Thu Oct 23, 2008 11:26 pm
by parthiban
Hi..,
i just tried to know the Hostid of my mainframe ..so i used following rexx syntax...

/*rexx*/
parse value socket("Gethostid") with s_rc
say 'the Hostid is' s_rc [/b]

Am getting following ERROR:

2005 ESUBTASKNOTACTIVE Subtask not active


Can any one help me....with proper syntax...

Re: rexx

PostPosted: Fri Oct 24, 2008 12:55 am
by MrSpock
Where'd you initialize the socket?

My code looks like this:
/* REXX */
Call Initiate_TCPIP_Services
Call Who_Am_I
Exit 0
 
Initiate_TCPIP_Services:
/* Initiate the Socket services */
returned_data = Socket('Initialize',Time(S))
Parse Var returned_data s_rc s_subtask s_maxdesc s_servicename
If s_rc = 0 Then Say s_servicename':'s_subtask' Initiated 's_maxdesc 'Sockets'
Return

Who_Am_I:
/* Find IP address of machine */
returned_data = Socket('GetHostId')
Parse Var returned_data s_rc s_results
Do While Length(s_results) > 0
  Parse Var s_results ip_address s_results
  Say 'My HOSTID(s) is/are 'ip_address
End
Return

Re: Rexx to know the Hostid of my mainframe

PostPosted: Thu Oct 30, 2008 7:46 pm
by parthiban
Hi..mrspock,

i tried your rexx example...Still i am getting error like this.......
Is there any problem in my server..or...anything else to do...pls guide me...

ERROR:

My HOSTID(s) is/are ESUBTASKNOTACTIVE
My HOSTID(s) is/are Subtask
My HOSTID(s) is/are not
***

Re: Rexx to know the Hostid of my mainframe

PostPosted: Thu Oct 30, 2008 9:13 pm
by MrSpock
Maybe a similar topic here might help?