Importing External Data to PX

In this example, we download external data from the State Regents server and import it into a PX work file for processing.


From the command line, connect to the remote site:

$ ftp ohlap.onenet.net
220 ftp.onenet.net NcFTPd Server (licensed copy) ready.
Connected to OHLAP.ONENET.NET.
Name (OHLAP.ONENET.NET:aid_floy): (given to you by remote server adminstrator)
331 User sgu344 okay, need password.
Password:  (given to you by remote server adminstrator)
230-You are user #2 of 50 simultaneous users allowed.
230-
230 Restricted user logged in.

View list of files or subdirectories.

FTP> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
drwxr-xr-x 2 root other 1536 Jul 11 09:57 common
drwxr-xr-x 2 ftpuser ftponly 512 May 21 2002 www

226 Listing completed.
125 bytes received in 00:00:00.00 seconds (122.07 Kbytes/s)

Change to a subdirectory if necessary.

FTP> cd common
250 "/common" is new cwd.

View list of files.

FTP> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r-- 54 ftpuser ftponly 7680 Jul 8 17:38 070805_DEFICIENT.XLS
-rw-r--r-- 54 ftpuser ftponly 2827776 Jul 8 17:38 070805_ELIGIBILITY.XLS
226 Listing completed.
470 bytes received in 00:00:00.00 seconds (152.99 Kbytes/s)

To get an Excel file:  SET TYPE BINARY or to get a text file, type: SET TYPE ASCII

To receive a file:     GET remote_filename (file will carry same name in local directory)
                            GET remote_filename  local_filename (filename renamed in local directory)

FTP> SET TYPE ASCII
200 Type okay.

FTP> GET   070805_ELIGIBILITY.XLS   OHLAP_ELIG_070805.TXT
200 PORT command successful.
150 Opening ASCII mode data connection for 070805_ELIGIBILITY.XLS (2827776 bytes
).
226 Transfer completed.
local: SYS$SYSDEVICE:[AID_FLOY]OHLAP_ELIG_070805.TXT;1 remote: 070805_ELIGIBILI
TY.XLS
2827776 bytes received in 00:00:17.40 seconds (158.65 Kbytes/s)

                To send a file, type:   PUT local_filename  (file will carry same name in local directory)
                                               PUT local_filename  remote_filename (filename renamed in remote directory)

 

To get help:  HELP

To end the session:  QUIT


From the command line:

...to be continued.  flp