Development and Pipeline

Development and Pipeline

Development and Pipeline

Connecting mainframe application developers to discuss efficiently creating and maintaining z/OS applications

 View Only
  • 1.  Local/Remote File transfer using scripts in IDz

    Posted Fri May 03, 2024 01:39 PM

    I have a requirement to copy a text file from my local file system to a remote system GDG (or even a flat file). Is there any way to do this other than a few mouse clicks mentioned here - Copying remote files. 

    Ibm remove preview
    Copying remote files
    You can copy and paste files within a remote system, from one remote system to another, or between different views of a remote system.
    View this on Ibm >

    ?

    I want to do this using a script (shell, pyhton, rexx) or a custom menu option showing my input file name and target file name? 



    ------------------------------
    Hamidali Kottaparamban
    ------------------------------


  • 2.  RE: Local/Remote File transfer using scripts in IDz

    Posted Mon May 06, 2024 10:16 AM

    Hamidali,

     

    If your security policies will allow you to store your password in a file on your PC, and you are wanting to upload from a Windows PC, then you could create an FTP script that contains the commands you want.  Something like this:

     

    open zos

    userid

    pwd

    bin

    lcd A:\TEMP

    cd 'ZMAC'

    QUOTE SITE RECFM=FB LRECL=1024 BLKSIZE=0

    QUOTE SITE UNIT=SYSDA CYL PRI=100 SEC=100 VOL=ZMAC01

    put a:\Temp\zmac.put2205.trs0.bin    'ZMAC.PUT2205.TRS00.BIN'

    bye

     

    You would need to specify the correct values for your situation.

     

    If you saved that file as c:\temp\upload.ftp, the command to invoke it would be:

     

    ftp -s:c:\temp\upload.ftp

     

    There are lots more elegant ways to do this from a script, including prompting for the password and dataset names.  Some allow sending the commands one at a time and handing various errors.  This is the simplest way I know of, but it usually meets my needs. 

     

    Best Regards,

    Wendell Lovewell

    417-882-8012

     

    Wendell Lovewell
    Information Technology Mgr./Developer
    Logo
    (417) 882-8012
    www.mackinney.com
    Banner





  • 3.  RE: Local/Remote File transfer using scripts in IDz

    Posted Tue May 07, 2024 10:13 AM

    There are a couple other approaches that could be considered.  If you have Zowe CLI installed on your system (e.g. with the RSE Plugin for Zowe CLI), one approach would be to write a shell script that uses zowe cli commands to do the copy.   Another would be to write a plugin extension to IDz that provides a context menu action and then use RSE client APIs to perform the upload.  



    ------------------------------
    Dave McKnight
    ------------------------------