Rexx to know the Hostid of my mainframe



IBM's Command List programming language & Restructured Extended Executor

Rexx to know the Hostid of my mainframe

Postby parthiban » Thu Oct 23, 2008 11:26 pm

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...
Parthiban jayaraman
mainframe rexxer,
Banglore
parthiban
 
Posts: 66
Joined: Mon Oct 20, 2008 7:54 pm
Location: Bangalore-India
Has thanked: 0 time
Been thanked: 0 time

Re: rexx

Postby MrSpock » Fri Oct 24, 2008 12:55 am

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
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times

Re: Rexx to know the Hostid of my mainframe

Postby parthiban » Thu Oct 30, 2008 7:46 pm

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
***
Parthiban jayaraman
mainframe rexxer,
Banglore
parthiban
 
Posts: 66
Joined: Mon Oct 20, 2008 7:54 pm
Location: Bangalore-India
Has thanked: 0 time
Been thanked: 0 time

Re: Rexx to know the Hostid of my mainframe

Postby MrSpock » Thu Oct 30, 2008 9:13 pm

Maybe a similar topic here might help?
User avatar
MrSpock
Global moderator
 
Posts: 809
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 4 times


Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post