× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Le 29/05/2015 14:21, rob@xxxxxxxxx a écrit :
<snip>
Did you try
qsh cmd('ssh -Thscroot@xxxxxxxxxxxxxxxxxxxx lssyscfg -r lpar -m RACK2
-F name,lpar_id,state > /tmp/RACK2partitions.txt') ?
</snip>

Well, I was wrong about this code. I mean we don't use it. We use STDOUT override.

We have an home-made command to run HMC commands.

Run an HMC command ($RUNHMCCMD)

Type choices, press Enter.

HMC name . . . . . . . . . . . .
HMC command . . . . . . . . . .
DB file to copy STDOUT in . . . *NONE Nom, *NONE
Clear DB file before copy . . . *NO *YES, *NO
Error handling . . . . . . . . . *NO *YES, *NO

The piece of CL code is below (removed error handling code).

CLRPFM FILE(QTEMP/STDOUT)
MONMSG MSGID(CPF0000) EXEC(CRTPF FILE(QTEMP/STDOUT) RCDLEN(500))
OVRDBF FILE(STDOUT) TOFILE(QTEMP/STDOUT)
CHGVAR VAR(&CMD) VALUE('ssh -T' *BCAT &USER *TCAT '@' *TCAT &HMC *BCAT '"' *TCAT &COMMAND *TCAT '"'))
QSH CMD(&CMD)
RTVMBRD FILE(QTEMP/STDOUT) NBRCURRCD(&NBRRCD)
IF COND(&NBRRCD *NE 0) THEN(DO)
IF COND(&DBFILE *EQ '*NONE') THEN(CPYF FROMFILE(QTEMP/STDOUT) TOFILE(*PRINT))
ELSE CMD(CPYFRMIMPF FROMFILE(QTEMP/STDOUT) TOFILE(&DBFILE) MBROPT(*ADD) STRDLM(*NONE) RMVBLANK(*TRAILING))
ENDDO

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.