Dear Team,


Thanks for reply and helping me to resolve this issue.



1)      Mainframe is getting file from windows. So, few of the files in
windows having today’s date and few of them having yesterday’s date( today
-1) .

2)      For today’s date below code is the solution you all suggested and
worked out.



//SFTPB24E JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=&SYSUID,USER=STCSYS

//STEP0    EXEC PGM=EZACFSM1

//SYSOUT   DD DSN=&&T,DISP=(,PASS),SPACE=(TRK,(1,0)),UNIT=VIO

//SYSIN    DD DATA,DLM=@@

OSHELL { echo 'lcd /u/op117/';                          +

         echo 'cd /XX/Output/TMP';  +

         echo 'ASCII';                                  +

         echo 'get MDS_&LYR4.&LMON.&LDAY..txt'; } |           +

         sftp -P 2222 [email protected]

         oget '/u/op117/MDS_&LYR4.&LMON.&LDAY..txt' -

              'MCCP.DATA.XX.MDS.SFTP'

@@

//STEP1    EXEC PGM=IKJEFT01,REGION=0M

//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC

//OUTPUT   DD SYSOUT=*

//SYSTSPRT DD SYSOUT=*

//SYSTSIN  DD DISP=(OLD,PASS),DSN=&&T



3)      Now, to get the file into Mainframe using SFTP and oshell with
yesterday’s date is the step we failing. So, can you please help me to
change this code mentioned above to get yesterday’s file.



Thank you so much once again for help.

On Thu, Jun 23, 2022, 01:25 Farley, Peter x23353 <
[email protected]> wrote:

> -----Original Message-----
> From: IBM Mainframe Discussion List <[email protected]> On Behalf
> Of Paul Gilmartin
> Sent: Wednesday, June 22, 2022 12:29 PM
> To: [email protected]
> Subject: Re: SFTP JOB Data parameter
>
> On Wed, 22 Jun 2022 16:06:06 +0000, Sri h Kolusu wrote:
>
> <Snipped>
> > > I for one prefer using the existing IBM utilities and there are
> utilities like DFSORT (of course I am biased towards it ) which does have
> plethora of Date arithmetic functions.
> >  I never mastered the syntax of DFSORT commands.
>
> IMHO SORT control syntax and usage are valuable and useful skills for any
> mainframe programmer to have.  One should make the effort to learn them if
> one can find the time; they make seemingly hard jobs far easier.  Start
> with small jobs and work your way up.
>
> I am still learning about SORT capabilities, though I have at least
> partially mastered using JOINKEYS (with the kind help of the esteemed Mr.
> Kolusu) to perform large matching and selecting operations I could not have
> easily solved otherwise.
>
> Not a master of that universe yet, only a journeyman at most.
>
> I'll match my awk skills against anyone's, but even there I am sure I have
> things to learn.
>
> The fun of learning new things is what makes each day easier to get
> through.
>
> Peter
> --
>
>
> This message and any attachments are intended only for the use of the
> addressee and may contain information that is privileged and confidential.
> If the reader of the message is not the intended recipient or an authorized
> representative of the intended recipient, you are hereby notified that any
> dissemination of this communication is strictly prohibited. If you have
> received this communication in error, please notify us immediately by
> e-mail and delete the message and any attachments from your system.
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to