z/OS

z/OS

z/OS

IBM z/OS is a widely-used mainframe operating system designed for a stable, secure and highly available environment for running mission-critical applications.

 View Only
Expand all | Collapse all

FTP vs SFTP: Process was working using FTP but SFTP is failing to 'get' file from Z/OS Mainframe to SAS

  • 1.  FTP vs SFTP: Process was working using FTP but SFTP is failing to 'get' file from Z/OS Mainframe to SAS

    Posted Fri February 07, 2025 01:46 PM

    Hello,

    We have a batch job on SAS, that 'GET's a monthly dataset from Mainframe system. Now they are modifying the process and did the SFTP setup. However, using SFTP to get the file, the job is failing. It is unable to locate the dataset. It is looking for the file in a directory like file system. And in Z/OS we do not have like /bin/... structure. How to point the SFTP to get the dataset, for example with name: 'PROD.XYZ.FILE1(0)'?

    This is how the error looks after the confection is established for the SFTP:

    sftp> get 'PROD.XYZ.FILE1(0)'

    File "/util/batch/username/PROD.XYZ.FILE1(0)" not found.

    I know I am missing a step. Is there a copy statement needed to get the Dataset to OMVS before the "get" command?

    Any help is appreciated.

    Thanks,

    Ram



    ------------------------------
    Ram Sankaran
    ------------------------------


  • 2.  RE: FTP vs SFTP: Process was working using FTP but SFTP is failing to 'get' file from Z/OS Mainframe to SAS

    Posted Fri February 07, 2025 03:37 PM

    Unfortunately, SFTP does not have direct access to MVS datasets.  There is a writeup on how to handle this at Accessing MVS data sets within sftp.

    Hope that helps...

    Scott 



    ------------------------------
    Scott Fagen
    Mainframe Evangelist
    CDW
    www.cdw.com/content/cdw/en/solutions/ibm-zsystems.html
    ------------------------------



  • 3.  RE: FTP vs SFTP: Process was working using FTP but SFTP is failing to 'get' file from Z/OS Mainframe to SAS

    Posted Fri February 07, 2025 03:57 PM

    Unfortunately, SFTP doesn't have direct access to MVS datasets.  There is a writeup on how to deal with this at Accessing MVS data sets within sftp.

    Hope that helps...

    Scott



    ------------------------------
    Scott Fagen
    Mainframe Evangelist
    CDW
    www.cdw.com/content/cdw/en/solutions/ibm-zsystems.htmlScott Fagen
    Mainframe Evangelist
    CDW
    www.cdw.com/content/cdw/en/solutions/ibm-zsystems.html
    ------------------------------



  • 4.  RE: FTP vs SFTP: Process was working using FTP but SFTP is failing to 'get' file from Z/OS Mainframe to SAS

    Posted Tue February 11, 2025 09:06 AM

    Hi Ram,

    In general, you might want to become familiar with z/OS Data Set File System.  In short, this function will allow z/OS UNIX commands to directly interact with certain MVS data sets.  SFTP is an ideal use case for this technologoy, which is available on all supported levels of z/OS today!  (Btw - you can set up z/OS Data Set File system during the installation of z/OS in the POSTDEPLOY Workflow.  It's easy to set up.)  

    Read more about it here:  https://www.ibm.com/docs/en/zos/3.1.0?topic=zos-data-set-file-system



    ------------------------------
    Marna Walle
    z/OS Installation and Upgrade
    IBM Poughkeepsie
    ------------------------------