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


  • Subject: Re: How to FTP to an IFS directory
  • From: "Gary Kuznitz" <docfxit@xxxxxxxxxxx>
  • Date: Tue, 28 Sep 1999 09:50:50 -0700

>      to send from pc to as400, try this :
> 
>      ftp your_as400
>      your_user
>      your_password
>      bin
>      prompt
>      quote
>      site namefmt 1
>      cd /QOpenSys
>      lcd your_pc_directory
>      put Namedcontrol.pl
> 
>      rgds,
>      HDA
> 
> 
> ______________________________ Reply Separator
> _________________________________ Subject: How to FTP to an 
IFS directory
> Author:  MIDRANGE-L@midrange.com (Gary Kuznitz) at bngtw Date:    
9/16/99
> 10:21 PM
> 
> Hi,
> 
> I have a Perl file on a PC named "Namedcontrol.pl"  I have a CL program
> that looks like:
> 
> Call PGM(Perldist/Perl) PARM('/QOpenSys/Namedcontrol.pl')
> 
> Does anyone know how to get the file from the PC into the directory 
> QOpenSys?  QOpenSys has been created from the 400 side already.  I 
> have been trying to FTP it but I haven't been able to figure out the 
> correct syntax yet.
> 
> Thank you very much for all your great help.
> 
> Gary Kuznitz

Thank you to all that answered.  I followed the above recommendation 
and the file went to the 400 very easily.  I can't seem to execute it 
though. 
The error I get is:
   Can't open perl script "/QOPENSYS/NAMEDCONTROL.PL": No such 
path or directory.

There is only two things I can think of that may be causing this.  One is 
there may be a way I need to tell the 400 where the root directory starts. 
 The other is the file may not have been converted properly.   I'm not sure 
if it was transferred ok or not.  I don't have a program (that I know of) 
that will look at it on the 400 side.  If I look at the PC file on the PC with 
Note Pad it looks like:
#!/usr/bin/perl################################
######################## Perl implementation of 
DYNDNS.COM's NamedControl Client.  ## by Gunnar Hellekson 
<ghelleks@herne.drew.edu> 11/2/96## based (heavily) on p.342 of the 
1st Camel 
book######################################
#################($ip, $user, $pass, $domain) = 
@ARGV;$AF_INET = 2;$SOCK_STREAM = 1;$SIG{'INT'} = 'dokill';sub 
dokill {   kill 9,$child if $child;}$sockaddr = "S n a4 x8";(   chop($ip = 
`/sbin/ifconfig ppp0 | /usr/bin/grep inet | /bin/cut -f2 -d: | /bin/cut -
c1-15`) &&   $ip =~ s/\s+//g) unless $ip;$user

If I look at the PC file on the PC with UEDIT32 it looks like:
#!/usr/bin/perl
#########################################
#############
#
# Perl implementation of DYNDNS.COM's NamedControl Client.  
#
# by Gunnar Hellekson <ghelleks@herne.drew.edu> 11/2/96
#
# based (heavily) on p.342 of the 1st Camel book
#
#########################################
#############

($ip, $user, $pass, $domain) = @ARGV;

$AF_INET = 2;
$SOCK_STREAM = 1;

$SIG{'INT'} = 'dokill';

sub dokill {
   kill 9,$child if $child;
}

$sockaddr = "S n a4 x8";

(
   chop($ip = `/sbin/ifconfig ppp0 | /usr/bin/grep inet | /bin/cut -f2 -d: 
| /bin/cut -c1-15`) &&
   $ip =~ s/\s+//g
) unless $ip;

$user

Unfortunatly UEdit32 gives me a GPF when I try to look at the file 
through Network Neighborhood.  NotePad gives me the same garbage.
Another thing I'm not sure of is when I look at the attributes of the file 
Namedcontrol.pl it says:
                                           Display Attributes                   
                    
                                                                                
     
 Object . . . . . . :            /QOpenSys/Namedcontrol.pl                      
           
 Type . . . . . . . . . . . . . . . . . :                    STMF               
                      
 Owner  . . . . . . . . . . . . . . . . :                    QSECOFR            
                      
 System object is on  . . . . . . . . . :                    Local              
                      
 Auxiliary storage pool . . . . . . . . :                    1                  
                    
    Object overflowed  . . . . . . . . . :                   No                 
                     
 Code page  . . . . . . . . . . . . . . :                    819                
                      
 Hidden file  . . . . . . . . . . . . . :                    No                 
                     
 PC system file . . . . . . . . . . . . :                    No                 
                     
 Read only  . . . . . . . . . . . . . . :                    No                 
                     
 Need to archive (PC) . . . . . . . . . :                    Yes                
                     
 Need to archive (AS/400) . . . . . . . :                    Yes                
                 
    
When I transfer the file with FTP it says the Code page is 819.  I don't 
know if that's correct.  If I copy and paste the file through Network 
Neighborhood the Code page is 4xx.  
Before I transferred the file I checked the system value QCCSID.  It is 
set at 37 for US English and on the PC in C:\Windows\CWBTFR.INI the 
only thing in the file is one line that reads:
[Client Access Data Transfer] ForceTranslation=1

By the way.  The program was compiled with QSECOFR and when I run it 
I am signed on as QSECOFR.

Does anyone know what I could be missing?

Thank you,

Gary Kuznitz
                             

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

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.