[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: PGP & SQR



I encounter your environment situation frequently when calling one process
from another.

Can you create a "wrapper" shell script that will work?

For example,

#!/bin/sh
source /home/someuser/.profile
/path/to/pgp -e $1 'Subject Message'

Then, in your sqr you could do:
let $to_run = '/path/to/script ' || $filename


Of course, all this assumes SQR is calling out properly. This technique
could be useful to figure that out too. You could, for example, use tee to
capture PGP's output to a log.

-----Original Message-----
From: Brian Pelton [mailto:bpelton@COMMUNITYMEDICAL.ORG]
Sent: Thursday, April 11, 2002 7:45 PM
To: SQR-USERS@list.iex.net
Subject: PGP & SQR


I'm trying to automate the encryption and email of a data file.
Boring background info:
Running PeopleSoft 7.51 w/ Oracle 8.0.1
SQRW 4.3.4
IBM AIX 4.3.3

The command works when I login and type it at a command prompt:
pgp -e /u01/app/HPRD/hr751/output/providers/CHS044_208.dat "Health Net EDI"

But, when I put the same command in a variable and call the system, it
fails:
let $chs044 = 'pgp -e {FILEPREFIX}providers/CHS044_' || $run_id || '.dat '
||
$qq || 'Health Net EDI' || $qq
call system using $chs044 $chs044_status

What I've noticed is that none of the environment variables seem to be setup
when calling the system.
Is there a way to process the ".profile" file when calling the system from
SQR?

Has anyone else had problems calling unix programs from within SQR?

Thanks for any info you can provide.....

Brian Pelton
bpelton@communitymedical.org