Hi Scott,
   I read some pages, do some actions ...
   and now when I try call in qsh command :
   /QOpenSys/QIBM/ProdData/DeveloperTools/perl587/bin/perl
   /usr/local/lib/perl5/5.00502/hostname.pl;
   nothing happens, not any error, message,warning ...
   file hostname.pl exist ...
   what I is wrong yet?
   When I try as400 native command
   CALL PGM(PERLDIST/PERL) PARM('/user/local/lib/perl5/5.00502/bigint.pl')
   I get:
   Perl requires descriptor-based stdio]
   Press ENTER to end terminal session.
   have you any idea what is still wrong?
   Tomek
   W dniu 2010-11-18 18:58, [1]midrange-l-request@xxxxxxxxxxxx pisze:
 message: 9
 date: Thu, 18 Nov 2010 11:53:06 -0600
 from: Scott Klement [2]<midrange-l@xxxxxxxxxxxxxxxx>
 subject: Re: Perl on AS400
 Hi Tomasz,
 On 11/18/2010 9:29 AM, Tomasz Skor?a wrote:
We try to run an perl script on AS400 inCL or RPG program, is it
possible? Which command should be use?
 I have perl installed, and I can run some scripts.  I don't really use
 it, but it's here and seems to run.  So, yes, I'd say it's possible.
 I'm not sure I understand what you mean by "which command should be
 use"?   The command is 'perl' -- but it's not a *CMD object.  It's a
 Unix program (Or, you could say it's a 'Unix command') and must be run
 from PASE.
I just download and install Licensed program 5799PTL and now I can see in LICPGM
5799PTL   *INSTALLED   IBM Tools for Developers for i5/OS
 Great!  So you've already installed it.  (Jumps for joy.)
When we call the same script from QSH screen - its work, but how to call it within CL/RPG?
 The QSH command has a CMD() parameter.  So, from CL, you can do:
 QSH CMD('cd /myperldir && perl myscript.pl')
 It's no different from any other QShell or PASE utility.  There are a
 bazillion different caveats, options, techniques, etc.  Teaching you the
 entire QShell environment in an e-mail would be like teaching you the
 entire ILE environment in an e-mail...
 So hopefully the above is enough to get you started, and remember,
 Google is your friend.  (But also your enemy!)
When we try call command in qsh:
/QOpenSys/QIBM/ProdData/DeveloperTools/perl
We get message:
qsh: 001-0017 Command /QOpenSys/QIBM/ProdData/DeveloperTools/perl not executable.
 That's because /QOpenSys/QIBM/ProdData/DeveloperTools/perl is not a
 program, it's a directory.  You can't run a directory.  (Just as you
 can't CALL a library in the native enviromnent -- CALL QGPL won't work,
 either.)
 You _should_ have link to perl in /QOpenSys/usr/bin  (or, at least, I
 do...)  So if /QOpenSys/usr/bin is in your PATH you can run it directly.
   Just type: perl your-script-name
 If /QOpenSys/usr/bin is not in your PATH, then you should add it. to
 your PATH.  For example, as a test, you can run the perl program and see
 it's version by doing this:
 QSH CMD('PATH=$PATH:/QOpenSys/usr/bin && perl -v')
 The part before the && adds /QOpenSys/usr/bin to your path temporarily.
   The 'perl -v' part runs perl with the -v switch, telling it to print
 it's version information.
What does it mean - perl was installed incorrectly?
Do yu have some clear monual for installing/using perl on as400?
 Not sure if anyone has written a manual on this or not...?  Never looked
 for one.
 ------------------------------
 message: 10
 date: Thu, 18 Nov 2010 11:56:45 -0600
 from: Scott Klement [3]<midrange-l@xxxxxxxxxxxxxxxx>
 subject: Re: Perl on AS400
 hi Dennis,
 On 11/18/2010 10:30 AM, Dennis Lovelady wrote:
Have you seen: [4]http://www.cpan.org/ports/os400/old/README.AS400 ?
 I strongly discourage using that port of perl.  That was someone's
 attempt to make perl run *natively* on OS/400.  And it did work...  but
 almost no script is compatible with that environment.  It's fine if you
 plan yo write your own...
 But every non-trivial perl script expects to be in a Unix environment.
 So I strongly recommend running the AIX version of perl, not the native
 one.  The AIX (PASE) one is installed automagically when you install
 5799-PTL, which Tomasz already installed.
 See...  sometimes Google is your friend, and sometimes it's your enemy.
 ------------------------------
 --
 This is the Midrange Systems Technical Discussion (MIDRANGE-L) digest list
 To post a message email: [5]MIDRANGE-L@xxxxxxxxxxxx
 To subscribe, unsubscribe, or change list options,
 visit: [6]
http://lists.midrange.com/mailman/listinfo/midrange-l
 or email: [7]MIDRANGE-L-request@xxxxxxxxxxxx
 Before posting, please take a moment to review the archives
 at [8]
http://archive.midrange.com/midrange-l.
 End of MIDRANGE-L Digest, Vol 9, Issue 1780
 *******************************************
References
   Visible links
   1. mailto:midrange-l-request@xxxxxxxxxxxx
   2. mailto:midrange-l@xxxxxxxxxxxxxxxx
   3. mailto:midrange-l@xxxxxxxxxxxxxxxx
   4. 
http://www.cpan.org/ports/os400/old/README.AS400
   5. mailto:MIDRANGE-L@xxxxxxxxxxxx
   6. 
http://lists.midrange.com/mailman/listinfo/midrange-l
   7. mailto:MIDRANGE-L-request@xxxxxxxxxxxx
   8. 
http://archive.midrange.com/midrange-l
As an Amazon Associate we earn from qualifying purchases.