REXX server/Java client



IBM's Command List programming language & Restructured Extended Executor

Re: REXX server/Java client

Postby moral » Fri Aug 17, 2012 11:17 am

It seems like there is some confusion in terminology... you do not need a separate UNIX system. Unix System Services is part of z/OS. And it seems like you can issue OMVS command, so you should be able to issue the rexx SYSCALLS function as shown in the Redbook.

But the JOB for starting the server looks like:

 //DARIOS   JOB CLASS=A,NOTIFY=&SYSUID                             
/*JOBPARM S=SC70                                                 
//STEP1    EXEC PGM=BPXBATCH,PARM='sh /u/dario/my_srv 30010'     
//SYSPRINT DD  SYSOUT=*                                           
//STDOUT   DD  PATH='/u/dario/stdout'                             
//STDERR   DD  PATH='/u/dario/stderr'                             
//STDENV   DD  *   

I don't understand the lines PARM='sh /u/dario/my_srv 30010' and //STDOUT DD PATH='/u/dario/stdout' and
//STDERR DD PATH='/u/dario/stderr'
moral
 
Posts: 14
Joined: Mon May 28, 2012 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Re: REXX server/Java client

 

Re: REXX server/Java client

Postby Pedro » Fri Aug 17, 2012 9:03 pm

Unix System Services (USS) are part of z/OS. And you have OMVS authority (which says you can use USS). The DD statements refer to USS files. Not sure what the PARM= is... likely the name of the rexx program.
Pedro Vera
User avatar
Pedro
 
Posts: 569
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 39 times

Re: REXX server/Java client

Postby Robert Sample » Fri Aug 17, 2012 9:26 pm

The "sh" says to execute a shell command script (which could be a REXX program) located in the /u/dario directory of Unix System Services and named my_srv; the 30010 is presumably a parameter used by the shell script. STDOUT and STDERR are standard output and error files used in Unix System Services (and Unix in general); both are located in the /u/dario directory and will contain the output (or errors) produced by whatever programs are executed by the shell script. Option 3.17 of ISPF will (generally) allow you to look in the /u/dario directory on your system. An executable program is invoked by using PARM='PGM xxx' where xxx is the name of the executable file. PARM='SH xxx' can be used to execute Unix System Services commands as well (PARM='sh ls -al' for example).
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: REXX server/Java client

Postby moral » Sat Aug 18, 2012 12:00 pm

Robert Sample wrote:The "sh" says to execute a shell command script (which could be a REXX program) located in the /u/dario directory of Unix System Services and named my_srv; the 30010 is presumably a parameter used by the shell script. STDOUT and STDERR are standard output and error files used in Unix System Services (and Unix in general); both are located in the /u/dario directory and will contain the output (or errors) produced by whatever programs are executed by the shell script. Option 3.17 of ISPF will (generally) allow you to look in the /u/dario directory on your system. An executable program is invoked by using PARM='PGM xxx' where xxx is the name of the executable file. PARM='SH xxx' can be used to execute Unix System Services commands as well (PARM='sh ls -al' for example).

Thank you very much.
moral
 
Posts: 14
Joined: Mon May 28, 2012 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX server/Java client

Postby moral » Sat Aug 18, 2012 8:28 pm

What I do wrong?
I go to the 3.17 (from the ISPF) and create:
    Pathname: /u/moral
    Permission: 777
    Link: blank
    File Type: 1. Directory
In the same way create: /u/moral/stdout and /u/moral/stderr
In directory /u/moral create:
    Pathname: /u/moral/serv
    Permission: 777
    Link: blank
    File Type: 2. Regular file
I can't edit file serv from 3.17 so I go to the 6 (Command) and issue ishell comand.
In UNIX System Services ISPF Shell i go to /u/moral and edit serv for example:
/*rexx*/
Say "Hi I'm REXX";
exit;

But when I submit the job:
//SERV JOB MORAL,CLASS=A,MSGCLASS=X,REGION=4M,
//           MSGLEVEL=(1,1),TIME=1440,NOTIFY=&SYSUID
//STEP1    EXEC PGM=BPXBATCH,PARM='sh /u/moral/my_srv'
//SYSPRINT DD  SYSOUT=*
//STDOUT   DD  PATH='/u/moral/stdout'
//STDERR   DD  PATH='/u/moral/stderr'
//STDENV   DD  *

System gives me an error:
BPXM009I BPXBATCH FAILED BECAUSE OPEN (BPX1OPN) FOR STDIN   FAILED WITH RETURN  CODE 00000081 REASON CODE 0594003D
IEF142I SERV STEP1 - STEP WAS EXECUTED - COND CODE 0255
IEF285I   IBMUSER.SERV.JOB02773.D0000102.?             SYSOUT
IGD104I HFS FILE WAS RETAINED, DDNAME IS (STDOUT  )
FILENAME IS (/u/moral/stdout)
IGD104I HFS FILE WAS RETAINED, DDNAME IS (STDERR  )
FILENAME IS (/u/moral/stderr)

In the Reason Codes from the UNIX System Services Messages and Codes i find:
003D
JRDirNotFound

A directory in the pathname was not found.

Action: One of the directories specified was not found.
Verify that the name specified is spelled correctly.

Why system gives me this error if the path is OK? Maybe I do something wrong when I create a serv file?
moral
 
Posts: 14
Joined: Mon May 28, 2012 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX server/Java client

Postby enrico-sorichetti » Sat Aug 18, 2012 8:57 pm

On Hercules I running z/OS.


and that is in conflict with IBM licensing agreement.

when You run pirated software You should at least have the skill to run it without asking around

will a moderator/administrator kindly delete the whole thread ( topic )
we do not want IBM think that ibmmainframeforum.com endorses/condones the use of licensed products on unlicensed platforms
I had already reported the topic, but probably the report slipped by!

(*)better change Your nickname from moral to immoral :mrgreen:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

Re: REXX server/Java client

Postby Robert Sample » Sat Aug 18, 2012 9:09 pm

If your job is going to execute something called my_srv, don't you think your edit session should be creating my_srv instead of serv?
Robert Sample
Global moderator
 
Posts: 3367
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 222 times

Re: REXX server/Java client

Postby moral » Sat Aug 18, 2012 9:20 pm

Robert Sample wrote:If your job is going to execute something called my_srv, don't you think your edit session should be creating my_srv instead of serv?

my mistake when I write post. In each place is my_srv
moral
 
Posts: 14
Joined: Mon May 28, 2012 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX server/Java client

Postby moral » Sat Aug 18, 2012 9:24 pm

enrico-sorichetti wrote:
On Hercules I running z/OS.


and that is in conflict with IBM licensing agreement.

when You run pirated software You should at least have the skill to run it without asking around

will a moderator/administrator kindly delete the whole thread ( topic )
we do not want IBM think that ibmmainframeforum.com endorses/condones the use of licensed products on unlicensed platforms
I had already reported the topic, but probably the report slipped by!

(*)better change Your nickname from moral to immoral :mrgreen:

Why are you so nervous? I tries learn something, that's all.
P.S.
In my work I have eal mainframe now I do it at work.
moral
 
Posts: 14
Joined: Mon May 28, 2012 12:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: REXX server/Java client

Postby enrico-sorichetti » Sat Aug 18, 2012 9:29 pm

Why are you so nervous? I tries learn something, that's all.


I am not nervous, why should I be anyway... ?
I just wanted to make You aware that what You are doing is illegal!
and Your organization might be incur in troubles , nothing more nothing less
upo to using it' s licensing rights for unlawful use of licensed IBM products
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2644
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

PreviousNext

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post