× 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.



Thanks. This helped me go in the right direction. I got it working!

Phil

On Wed, Apr 7, 2010 at 11:41 AM, Leonard Burns IV <lburns@xxxxxxxxxxx> wrote:
What I do is create a variable and pass the invidual variables to that, then
send the main variable to the command. This is test code so its messy, don't
judge! :)


DCL        VAR(&CMD) TYPE(*CHAR) LEN(200) VALUE(' ')

CHGVAR     VAR(&CMD) VALUE('test' *CAT &SNGQTE *CAT +
            '/TEST/IMAGES/' *TCAT &$INPUT *TCAT +
            &SNGQTE *CAT ' ' *CAT &SNGQTE *CAT +
            '/TEST/IMAGES/' *TCAT &$OUTPUT *TCAT &SNGQTE)

CALL       PGM(QP2SHELL) PARM('/QOpenSys/usr/bin/sh' +
            '-c' &CMD)


Leonard


-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of ssc1478
Sent: Wednesday, April 07, 2010 11:01 AM
To: Midrange Systems Technical Discussion
Subject: Passing arguments with Q2PSHELL

I am trying to figure out how to pass arguments to the command that I
am also passing to Q2PSHELL.  I've been googling but so far haven't
found the answer I'm looking for.

This is the command in my CL pgm:
 CALL       PGM(QP2SHELL) PARM('/QOpenSys/bin/sh' '-c' +
                         &SCRIPTFQ &SRCFILE &TGTFILE
                         &CURUSER &TGTHOST)

&SCRIPTFQ is the name of the script that I want to be executed.  This
works - it is being executed.
The remaining 4 variables I want passed to the script in &SCRIPTFQ.

I've tried a few different things but none so far have worked.

Each variable is null terminated.  The OS version is 6.1.

If I call Q2PTERM at the command line and then execute the script with
the arguments, it works.  So I'm confident that my problem is with my
not understanding how to pass the arguments.

Thanks in advance for any help!

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

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



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.