Getting RC=103 when using target-command and having STDIN DD

General discussion of the Co:Z Toolkit
Post Reply
sctebnt
Posts: 30
Joined: Mon Nov 02, 2009 10:47 pm

Getting RC=103 when using target-command and having STDIN DD

Post by sctebnt »

I am using the target-command property to have CoZ Launcher run a specific shell script on Linux instead of specifying the commands within the STDIN of the JCL Step.

My JCL still had the STDIN DDNAME and the DD did contain cards. I expected CoZ Launcher to either run both the target-command and STDIN or to only run target-command and ignore STDIN.

However CoZ Launcher instead execute my target-command but set the job step RC to 103, I assume because there were cards found in STDIN.

Is this the expected result? Are there other option to control the actions of CoZ Launcher when both a target-command and STDIN exist?

Code: Select all

fromdsn(DD:STDIN)[N]: 4 records/320 bytes read; 67 bytes written in 0 millisecon
debug1: channel 1: free: 127.0.0.1, nchannels 4                                 
                                                                                
todsn(DD:STDOUT)[N]: 32 bytes read; 1 records/31 bytes written in 0 milliseconds
debug1: channel 2: free: 127.0.0.1, nchannels 3                                 
                                                                                
todsn(DD:STDERR)[N]: 0 bytes read; 0 records/0 bytes written in 0 milliseconds. 
debug1: channel 3: free: 127.0.0.1, nchannels 2                                 
                                                                                
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0           
                                                                                
cozagent[E]: Stdin DD Reader(20500) received signal - 13                        
debug1: channel 0: free: client-session, nchannels 1                            
dovetail
Site Admin
Posts: 2022
Joined: Thu Jul 29, 2004 12:12 pm

Post by dovetail »

What the launcher / and Co:Z Agent (on the target system) does is to run *some* target program. The default is the user's default login shell.

In all cases, DD:STDIN is redirected to the stdin handle of the target program. For a shell, stdin contains the shell script.

It sounds like in your case that the Co:Z Agent is failing because it is trying to pipe DD:STDIN to the target program and the target program is terminating without consuming the datat (signal 13 is SIGPIPE).
sctebnt
Posts: 30
Joined: Mon Nov 02, 2009 10:47 pm

Post by sctebnt »

That was exactly what was happening, I added some logic to my script to process the STDIN FD and I am now getting my expected results.

Thanks!!
Post Reply