My usual setup looks something like this.

File testqsh.sh in my home directory.

export PASE_SYSCALL_NOSIGILL=plock=0
ssh -T 172.24.1.36 "ls > testssh.txt"

Permission on that file:
ls -l testq*
-rwxr-xr-x 1 kevin 0 75 Oct 2 13:58 testqsh.sh

Run it:
QSH CMD('/kevin/testqsh.sh')
Command ended normally with exit status 0

I do have this in most cl's that call into qsh:
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(NONE)

-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Wednesday, October 02, 2019 1:33 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: How to call QP2TERM with parameters?

Trying this method. One, it didn't work. Two, it still prompted me to enter at end instead of just completing.
Might this be a qsHell vs qp2term issue?

edtf '/home/ADOPT/test.sh'
************Beginning of data**************
ssh -T -v -v -v -i .ssh/id_rsa_user ADOPT@as2edi01 "dir >/users/ADOPT/testdirout1421.txt"
************End of Data********************

QSH CMD('/QOpenSys/usr/bin/sh -c "/home/ADOPT/test.sh"')
Command ended normally with exit status 126.

Looked up that QSH0005 message.
ADDENVVAR ENVVAR(QIBM_QSH_CMD_OUTPUT) VALUE(STDOUT) LEVEL(*JOB) Ran it again.
/QOpenSys/usr/bin/sh: /home/ADOPT/test.sh: 0403-006 Execute permission denied CHGAUT OBJ('/home/adopt/test.sh') USER(*PUBLIC) DTAAUT(*RWX) (it was missing the X) Ran it again.
/home/ADOPT/test.sh: 0403-057 Syntax error at line 1 : ``' is not matched.



Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Justin Taylor
Sent: Wednesday, October 2, 2019 1:59 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: How to call QP2TERM with parameters?

CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.


I think this is what you're looking for:
"How to Call PASE Commands/Scripts from a Command Line, CL Program, or in a Submitted Job"
https://www.ibm.com/support/pages/how-call-pase-commandsscripts-command-line-cl-program-or-submitted-job


HTH


-----Original Message-----
From: Rob Berendt [mailto:rob@xxxxxxxxx]
Sent: Wednesday, October 02, 2019 12:46 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: How to call QP2TERM with parameters?

How do I bypass the interactive work of CALL QP2TERM ssh -T -v -v -v -i .ssh/id_rsa_user ADOPT@as2edi01 "dir >/users/ADOPT/testdirout.txt"

I tried
CALL PGM(QP2TERM) PARM('ssh -T -v -v -v -i .ssh/id_rsa_user ADOPT@as2edi0 1 "dir >/users/ADOPT/testdirout3.txt"') And, along with some unseemly references to my dear sainted mother, it gave me CPFB9CA
Message . . . . : Batch job ended in error.
Cause . . . . . : Program QP2TERM starts a batch job to run a PASE for i
shell program. An exception caused the batch job to end abnormally.
Recovery . . . : Check the job log for the batch job to determine what
error occurred. Correct the error, and then try the request again.

I didn't see any 'job submitted' type messages in this joblog so I'm assuming we're talking about a spawn process instead. That, and DSPLOG shows no new related jobs in that time frame.
WRKSPLF PERIOD((133440 *CURRENT)) was bereft of any entries.
WRKSPLF SELECT(*ALL) PERIOD((133440 *CURRENT)) didn't seem to show any related to the user signed on, nor any IBM type user

Rob Berendt
--
IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive
Garrett, IN 46738
Ship to: Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


[https://www.medtronsoftware.com/img/MedtronMinilogo.bmp] Kevin Bucknum
Senior Programmer Analyst
MEDDATA / MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com



CONFIDENTIALITY NOTICE

This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged. This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.