Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

BPXBATCH output

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

New User


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

PostPosted: Fri Jun 06, 2014 6:19 am    Post subject: BPXBATCH output
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

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

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

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

http://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: 55
Location: Brampton, Ontario, Canada

PostPosted: Tue Jun 10, 2014 8:51 pm    Post subject:
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    Post subject:
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: 55
Location: Brampton, Ontario, Canada

PostPosted: Fri Jun 20, 2014 7:02 am    Post subject:
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    Post subject:
Reply with quote

According to the note here:

http://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: 55
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 5:17 am    Post subject:
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: 7914
Location: Bellevue, IA

PostPosted: Mon Jun 23, 2014 6:05 am    Post subject:
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: 55
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 6:54 am    Post subject:
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: 55
Location: Brampton, Ontario, Canada

PostPosted: Mon Jun 23, 2014 6:53 pm    Post subject:
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    Post subject:
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: 55
Location: Brampton, Ontario, Canada

PostPosted: Fri Jul 25, 2014 9:25 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts output data in CSV Format janmejay COBOL Programming 8 Sat Oct 15, 2016 2:20 pm
This topic is locked: you cannot edit posts or make replies. output data in CSV Format janmejay DFSORT/ICETOOL 3 Sat Oct 15, 2016 2:16 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us