Dear All,
Thanks you so much. Finally below code worked. But in this, we are getting
current (today’s date) but in some of the files, we are getting yesterday’s
date (today’s -1) .
How can we make this process work for yesterday’s date.
But in this, we are able to retrieve
//SFTPDOBM 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 /3DSecure/KWT/TMP'; +
echo 'ASCII'; +
echo 'get NonMon_DailyExtract_KWT_&LYR4.&LMON.&LDAY..txt'; } | +
sftp -P 2222 [email protected]
oget '/u/op117/NonMon_DailyExtract_KWT_&LYR4.&LMON.&LDAY..txt' -
'NBFDP.XX.SECURE.DOBMOB.XX.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
On Fri, Jun 17, 2022, 17:56 Bill Godfrey <[email protected]> wrote:
> The OP's input to sftp has "lcd /u/op117/"
> and later "get EBC-GOV-yyyymmdd.txt".
> If the "get" command had slashes inside yyyymmdd
> then it would look like this: "get EBC-GOV-yyyy/mm/dd.txt"
> and sftp would write a file named "/u/op117/dd.txt" if it found the file,
> and the OGET '/u/op117/EBC-GOV-yyyymmdd.txt' command would not find the
> file that sftp wrote.
>
> I cannot read his mind, but I think the OP did not mean the slashes
> literally when he said
> "in this yyyymmdd should be replace with year/month/date".
> The logic makes more sense if slashes are left out when the date is
> substituted.
>
> On Fri, 17 Jun 2022 07:14:16 -0500, John S. Giltner, Jr. wrote:
>
> >>Not quite, but:
> >> date '+get EBC-GOV-%Y/%m/%d.txt'
> >>
> >> o Why bother with "echo" of a command substitution?
> >> o IIRC, the OP specified slashes. (?!)
> >> Ex : EBC-GOV-yyyymmdd.txt' in this yyyymmdd should be
> >> replace with
> >> year/month/date.
> >
> >My fault, did not read the whole thing. I just saw yyyymmdd as went with
> that, missed that it needed the "/" in there.
>
> ----------------------------------------------------------------------
> 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