Page 2 of 3

Re: REXX server/Java client

PostPosted: Fri Aug 17, 2012 11:17 am
by moral
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'

Re: REXX server/Java client

PostPosted: Fri Aug 17, 2012 9:03 pm
by Pedro
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.

Re: REXX server/Java client

PostPosted: Fri Aug 17, 2012 9:26 pm
by Robert Sample
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).

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 12:00 pm
by moral
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.

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 8:28 pm
by moral
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?

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 8:57 pm
by enrico-sorichetti
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:

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 9:09 pm
by Robert Sample
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?

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 9:20 pm
by moral
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

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 9:24 pm
by moral
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.

Re: REXX server/Java client

PostPosted: Sat Aug 18, 2012 9:29 pm
by enrico-sorichetti
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