Hello Rob,

I find it strange that your home directory is /FTP. A Home directory is intended to be your own little "work space", i.e. an IFS directory that's unique to your user profile. Most shops choose to use /home/your-userid for that.

That's not related to your question -- I just wanted to pass it along as an observation. If you put a .profile (or .ssh, etc) in the /ftp directory, and /ftp is not unique to your user profile, then it'll affect other users...

Anyway, the .profile file is read by the Unix shell that's invoked. Some shells use .profile, and some do not -- but I believe all of the ones that IBM includes with the OS use it, so unless you've installed a different shell, the .profile file should be read when the shell is invoked. It should matter whether you use Putty vs. any other terminal program.

You also ask where to find the file. Files beginning with a dot are "hidden" files in Unix, so typically they won't show up in a directory listing. As others have suggested, you can see it in WRKLNK if you use DSPOPT(*ALL). If you use the 'ls' command in QShell or PASE to list files, you can add the -a switch to see the hidden files.

The "echo" command you posted will create the .profile file if it doesn't exist.

Another way to set the PATH (instead of .profile) is to set the PATH environment variable. I personally have a PATH that's set system-wide for all of my users via ADDENVVAR LEVEL(*SYS). Then, I override that setting for myself by having an ADDENVVAR LEVEL(*JOB) in the INLPGM of my user profile. (I tend to do extra stuff that normal users do not.) Please be aware that Unix software is typically case-sensitive, so 'PATH' is not the same as 'path' or 'Path'.

You can use .profile instead of the LEVEL(*JOB), however. If you set it in both places, the .profile should take precedence.

-SK

On 7/26/2012 1:43 PM, rob@xxxxxxxxx wrote:
I was reading

http://www.iprodeveloper.com/article/application-development/using-gnupg-for-pgp-on-i-64370

Typing <sic: PATH> every time I start PASE is very cumbersome.
Fortunately, you don't have to type it every time! Instead, you can put
the command into a special file named .profile, and the command will
automatically be run every time you start a PASE shell. For example, I can
type the following within PASE.

echo
"PATH=$PATH:/QOpensys/usr/local/bin:/usr/local/Zend/Core/bin:/usr/local/mysql/mysql/bin"
$HOME/.profile

My question is this: Will that .profile also be used by a putty session?

Another question is where do I find that .profile file?
I did DSPUSRPRF ROB
Home directory . . . . . . . . . . . . . . : /FTP
WRKLNK '/FTP/*'
There's nothing that which begins with a period.

Rob Berendt



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.