As a starting point:
//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=&SYSUID
//TAILOR  EXEC PGM=PGM=EZACFSM1
//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=&CMDS,
//         UNIT=VIO,SPACE=(TRK,(1)),
//         RECFM=FB,LRECL=80,BLKSZE=800
//SYSIN    DD *
OSHELL { echo 'lcd /u/op117/';
         echo 'cd /FRB/EBCClearing/Staging/tmp';+
         echo 'ASCII'; +
         echo 'get EBC-GOV-&LYYMMDD..txt'; } | +
       sftp -P 2222 eftmfge...@10.222.xx.xx
OGET '/u/op117/EBC-GOV-&LYYMMDD..txt'                      -
     'NBFDP.DATA.XX.XX.SFTP'
//STEP1   EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
//SYSTSIN   DD DSN=&CMDS,DISP=(OLD,DELETE)
//OUTPUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
/*

At 05:44 AM 6/15/2022, saurabh khandelwal wrote:
--

Dear All,

I am am running below Job in TSO env and getting to get file file from windows to Mainframe env.

Initially file was static and all worked well. But now, requirement is to get the file, which has current time stamp on daily basis.

Ex : EBC-GOV-yyyymmdd.txt' in this yyyymmdd should be replace with year/month/date.

But I am unable to find way to achieve this goal. Can you please help on this issue.
//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=&SYSUID
//STEP1   EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
//SYSTSIN   DD DSN=NP.LIB.CLIST(SFTPSEBC),DISP=SHR
//OUTPUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
/*
EDIT      NP.LIB.CLIST(SFTPSEBB) - 01.01                Columns 00001 00072
Command ===>                                                  Scroll ===> CSR
000007 OSHELL { echo 'lcd /u/op117/';
000008          echo 'cd /FRB/EBCClearing/Staging/tmp';+
000009          echo 'ASCII'; +
000010          echo 'get EBC-GOV-yyyymmdd.txt'; } | +
000011        sftp -P 2222 eftmfge...@10.222.xx.xx
000012 OGET '/u/op117/EBC-GOV-yyyymmdd.txt'                      -
000013      'NBFDP.DATA.XX.XX.SFTP'

****** **************************** Bottom of Data ****************************

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to