BookmarkSubscribeRSS Feed
RgrWilliams
Calcite | Level 5

II've scoured the internet for examples, but my team and I can't seem to get this done. I'm unfamiliar with mainframes, but the mainframe admin has supplied us what he says are valid values for the relevant dummy values below.


FILENAME theFile FTP 'filenameOnMainframe' HOST=’hostname’ PORT=portnum

LRECL=80 BLOCKSIZE=6160 USER=’USERNAME’ PASS='PASS'

RECFM=F ENCODING=ASCII DEBUG RCMD='SITE CY PRI=15 SEC=50';

DATA _NULL_;

     FILE theFile;

PUT @1 'TEST';

RUN;


When I run the above, I get these errors:

ERROR: Open failed for file FTP1  

ERROR: The connection has timed out..

Presuming my values are correct, any ideas on why this is not working? We've had success FTPing to, say, a shared drive.

1 REPLY 1
jakarman
Barite | Level 11

Would start first reading a Mainframe dataset. Just to check host-ip portnumber are not blocked by firewalls.

Possible start using ping  telnet (change to port 21/22 instead of 23)

The message is suggesting the partner is not reachable

SAS(R) 9.4 Statements: Reference (filename)

The rcmd should come form the mainframe guys as validated values. When not, you are giving command that are in error.
The port number is 21 (I believe) for old classic FTP, with encryption it 22 and indicated as SFTP. Logical/functions no difference.

The filename can be hierarchic (HFS like Unix) or classic 8.8.8. naming (z/os bound).  Both are controlled by RACF (ACF-2) for the authorisation.

The locking of the dataset is different. See the diiferences on that see DISP= options. In that case I would advice using a PDSE (existing-preallocated) and not coding lrecl/blksize).  

SAS(R) 9.4 Companion for z/OS  (filename Z/OS)    

---->-- ja karman --<-----

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 1027 views
  • 3 likes
  • 2 in conversation