Some time ago we had a long discussion about return codes from HCP or VMCP. They
are different. HCP behaves almost like a CMS programer would expect. VMCP
behaves more like a UNIX programer would expect. You get to choose. If you don't
like either one then write your own command.

[EMAIL PROTECTED] wrote:
Is there a way to get vmcp to return the CP return code rather than 1?

hcp behaves as I'd expect:
# hcp q linux04
HCPCQU045E LINUX04 not logged on
# echo $?
45

But vmcp seems to return only 0 or 1:

# vmcp q linux04
HCPCQU045E LINUX04 not logged on
Error: non-zero CP response for command 'Q LINUX04': #45
# echo $?
1

So do I have to parse the stdout (which gets ugly) to get the rc?  Thanks.

"Mike MacIsaac" <[EMAIL PROTECTED]>   (845) 433-7061


--
Stephen Frazier
Information Technology Unit
Oklahoma Department of Corrections
3400 Martin Luther King
Oklahoma City, Ok, 73111-4298
Tel.: (405) 425-2549
Fax: (405) 425-2554
Pager: (405) 690-1828
email:  stevef%doc.state.ok.us

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to