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



Hi Shane,

Can you change the script to accept the password as a parameter rather than adding it as an environment variable? Having in the environment seems like a security hole, even if you remove it afterwards.

The %trim is unnecessary since trailing blanks are removed when the value is added. Use WRKENVVAR to look at what's in there after running your CLLE program.

The only other thing I can think of besides the CCSID that Stefan mentioned, is that maybe the script does not look at the *JOB level environment variables and instead looks at the *SYS level.

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx
pdow@xxxxxxxxxxxxxx /

On 4/11/2024 12:07 PM, Shane Reeves wrote:
I'm trying to update a CLLE program that someone else wrote, and I'm stuck with trying to make the change I want.

The program calls a script that does a SFTP process that requires a password. Different connections require different passwords. The way the program is currently setup, the password is assigned to an ENVVAR based on the connection needed.
This works as-is. However, all of the passwords are hard-coded into the CLLE program currently.

ADDENVVAR ENVVAR(PASSWORD) VALUE('ThePassword') +
REPLACE(*YES)

What I want to do is instead pull the password from a file so that the program doesn't need to be updated every time a new connection is needed.

ADDENVVAR ENVVAR(PASSWORD) VALUE(&FL1_Pass) +
REPLACE(*YES)

However this fails. Different passwords are different length so the field has to be long enough support them all (and future passwords), so I suspect the issue is that the trailing spaces that get pulled in are causing the connection to fail. I've tried adding %Trim to get rid of the spaces; however this isn't allowed.

ADDENVVAR ENVVAR(PASSWORD) VALUE(%Trim(&FL1_Pass)) +
REPLACE(*YES)

I've also tried adding
ALWVARLEN(*YES)
To the DCLF statement, but that hasn't helped.

Can anyone please point me in the right direction?

thanks

Shane Reeves

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.