IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

BPXBATCH output


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Fri Jun 06, 2014 6:19 am
Reply with quote

I have a compiled REXX exec that invokes commands in a file via:

"BPXBATCH SH" file_name

I have STDOUT allocated to an OMVS dataset. When I run this on our system, it works just fine.

When the compiled load module is run on another system, no output is writted to STDOUT. There are no messages issued to STDERR. I do not have direct access to this other system.

I cannot figure out the reason for the missing output. Could an environment variable be causing this?

Yes, I did a forum search before posting this.

TIA
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Tue Jun 10, 2014 8:15 pm
Reply with quote

I think, 8.2 section of the below pdf may help you,

www.duemig.de/Dokumente/BPXBatch.pdf
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Tue Jun 10, 2014 8:51 pm
Reply with quote

Rohit -

I am aware of most of that information. However, there are a few things that I will have to test. I have circumvented the problem by redirecting the output to a file rather than STDOUT.

I will post any new developments here.

Thanks
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Wed Jun 11, 2014 6:22 pm
Reply with quote

Ugh..trying to debug a problem on a system to which you have no access!

Check the basics.
Make them copy the JCL they used and let you see it. It could be a typo.

Make sure they have permission to write to the file name they used.

Did they compile it themselves, or are they running YOUR load module?

Make them give you the entire job output. There could be a BPXBATCH error message.
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Fri Jun 20, 2014 7:02 am
Reply with quote

Quote:
Make them copy the JCL they used and let you see it. It could be a typo.


JCL looks good to me.

Quote:
Make sure they have permission to write to the file name they used.


Their user ID is a super-user

Quote:
Did they compile it themselves, or are they running YOUR load module?


They are running my load module.

I modified the REXX to have the output redirected to a file rather than STDOUT. I have also turned trace on in the REXX. Now, when they run it, the trace says:

*-* "BPXBATCH SH" hfscmd ">" hfsout
>>> "BPXBATCH SH /tmp/rhfsadm-etc....
+++ RC(35072) +++

I have no idea of the meaning of code 35072. Google gave various other hits for this on things like Red Hat Linux but nothing that seemed to be related to what I am doing. I thought that it might be related to region size so I tried it with REGION=64K and I recieved RC(-2168).

At least I am now getting an error code of some sorts. I guess that is progress.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Fri Jun 20, 2014 6:39 pm
Reply with quote

According to the note here:

www-01.ibm.com/support/knowledgecenter/SSLTBW_1.12.0/com.ibm.zos.r12.bpxa500/bpxza5b01952.htm%23wq3040?lang=en

A return > 255 is the return code from the program CALLED by bpxbatch. So take that number and dived it by 256, which is 132 in this case.

So, whatever you are running on their system is getting that rc. Since you say it's your program, do you have an RC=132?
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 5:17 am
Reply with quote

My invocation of BPXBATCH only executes a command script, not any of my own programs. The command input script is as follows:

Code:
PS1="#";export PS1                             
echo ' '                                       
echo ">> CMD:" chmod o=rwx '/u/userid/file.txt'
chmod o=rwx '/u/userid/file.txt'               
echo "<< RC: $?"                               
echo ">>>> CMDEND"                             
exit                                           


I have inherited this code so I am not that familiar with all of its contents. The strange thing is that this code works just fie on my system but it does not appear to work on another users system (in a different country).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Mon Jun 23, 2014 6:05 am
Reply with quote

Currency symbols don't always translate from country to country; that '$' might need to be changed.
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 6:54 am
Reply with quote

The end user is in Europe so it is probably being converted to a euro sign.

Many thanks.
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 6:53 pm
Reply with quote

According to the IBM UNIX System Services User's Guide, $# is:

Quote:
The number of positional parameters passed to this shell script. This number can be changed by several shell commands (for example, set or shift);


To me, that sounds like things should be OK. However, I will keep investigating this.
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Jun 23, 2014 7:07 pm
Reply with quote

The dollar sign question mark combination is showing the return code of the most recent command.

The dollar sign means 'variable' and the question mark is the return code.

You can see things like:
command1
cmd1_rc=$?
command2
cmd2_rc=$?

echo $cmd1_rc $cmd2_rc

I just did a quick search on how to use the variable indicator on a system with Euro symbols, and got nothing. It's possible that it still requires the dollar sign character to work. If so, you're going to have to get that file transferred without that character being translated.
Back to top
View user's profile Send private message
Grant Goodale

New User


Joined: 13 Nov 2010
Posts: 67
Location: Brampton, Ontario, Canada

PostPosted: Fri Jul 25, 2014 9:25 pm
Reply with quote

Finally got this one nailed down! Turns out that the user needed REGION=48M on the EXEC to make it work. REGION=32M gave a 4093 abend.

Unix is definitely the result of caffeine overdose
icon_confused.gif
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Mon Jul 28, 2014 5:52 pm
Reply with quote

48M?!?! That's a lot of space!

So glad it's working.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Joinkeys - 5 output files DFSORT/ICETOOL 7
No new posts Build a record in output file and rep... DFSORT/ICETOOL 11
No new posts XDC SDSF output to temp dataset CLIST & REXX 4
No new posts XL C Trace Preprocessor Output All Other Mainframe Topics 3
Search our Forums:

Back to Top