Re: SFTP JOB Data parameter

2022-06-30 Thread Seymour J Metz
The fact that IBM bothered to do SysRexx suggests that they see value in it.

I've never found running ISPF in batch to be awkward.

Any large volume CPU-bound task is best implemented in a language that can be 
compiled to machine code; that includes languages with effective JIT 
compilation. So, yes, other languages are more suitable for that use case.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of Sri 
h Kolusu [skol...@us.ibm.com]
Sent: Wednesday, June 22, 2022 12:06 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

>> Mr. Natural says, Use the right tool for the job.

Gil,

I agree with the statement, however in this case rexx isn't the right tool.   
Here are a few reasons I can think off

1.  Most shops discourage the use of REXX in production jobs
2.  In this case the exec is simple , however if your exec needs ISPF services 
then running REXX in batch is a pain to set up.
3.  For smaller input rexx might be good, but it is a poor choice to process 
large volumes of data.


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.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
abc
//SORTOUT  DD SYSOUT=*
//SYSINDD *
  OPTION COPY
  INREC BUILD=(C'get NonMon_DailyExtract_KWT_',
   DATE1-1,
   C'.txt',
   80:X)
/*

Will produce  get NonMon_DailyExtract_KWT_20220621.txt

If you want the date with separators it is quite simple. Use DATE1(.)-1, and it 
will produce get NonMon_DailyExtract_KWT_2022.06.21.txt


Thanks,
Kolusu


--
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


Re: SFTP JOB Data parameter

2022-06-23 Thread Michael Oujesky

One way, presuming the job runs once per day:
//SFTPB24E JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=,USER=STCSYS
//GETYEST  EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC
//OUTPUT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DISP=OLD,DSN=MYHLQ.YESTFILE.CMD
//*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\*
//BLDGET   IF RC=0 THEN
//BYEBYE   EXEC PGM=IEFBR14
//YESTFILE DD   DISP=(MOD,DELETE),DSN=MYHKQ.YESTFILE.CMD,
// UNIT=SYSALLDA,SPACE=(TRK,(0))
//**
//STEP0EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=MYHLQ.YESTFILE.CMD,DISP=(NEW,CATLG),
// SPACE=(TRK,(1,0)),UNIT=SYSALLDA
//SYSINDD DATA,DLM=@@
OSHELL { echo 'lcd /u/op117/';  +
 echo 'cd /XX/Output/TMP';  +
 echo 'ASCII';  +
 echo 'get MDS_'; } |   +
 sftp -P  eftmfge...@10.222.xx.yy
 oget '/u/op117/MDS_' -
  'MCCP.DATA.XX.MDS.SFTP'
@@
//BLDGET ENDIF
Seed it by running the BLDGET steps the day before regular runs begin.

Michael



At 01:58 AM 6/23/2022, saurabh khandelwal wrote:


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=,USER=STCSYS
//STEP0EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=&,DISP=(,PASS),SPACE=(TRK,(1,0)),UNIT=VIO
//SYSINDD DATA,DLM=@@
OSHELL { echo 'lcd /u/op117/';  +
 echo 'cd /XX/Output/TMP';  +
 echo 'ASCII';  +
 echo 'get MDS_'; } |   +
 sftp -P  eftmfge...@10.222.xx.yy
 oget '/u/op117/MDS_' -
  'MCCP.DATA.XX.MDS.SFTP'
@@
//STEP1EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC
//OUTPUT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DISP=(OLD,PASS),DSN=&

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.


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


Re: SFTP JOB Data parameter

2022-06-23 Thread saurabh khandelwal
Hello, Paul,

I, could not get you . Can you please help us to understand what exactly
you are looking

On Thu, Jun 23, 2022, 13:33 Paul Gilmartin <
042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

> On Thu, 23 Jun 2022 09:58:30 +0300, saurabh khandelwal  wrote:
> >
> >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) .
> >
> So there are multiple files ("few").  Do you know a priori which have
> today's
> date and which have yesterday’s date?
>
> -- gil
>
> --
> 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


Re: SFTP JOB Data parameter

2022-06-23 Thread Paul Gilmartin
On Thu, 23 Jun 2022 09:58:30 +0300, saurabh khandelwal  wrote:
>
>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) .
> 
So there are multiple files ("few").  Do you know a priori which have today's
date and which have yesterday’s date?

-- gil

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


Re: SFTP JOB Data parameter

2022-06-23 Thread saurabh khandelwal
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=,USER=STCSYS

//STEP0EXEC PGM=EZACFSM1

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

//SYSINDD DATA,DLM=@@

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

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

 echo 'ASCII';  +

 echo 'get MDS_'; } |   +

 sftp -P  eftmfge...@10.222.xx.yy

 oget '/u/op117/MDS_' -

  'MCCP.DATA.XX.MDS.SFTP'

@@

//STEP1EXEC PGM=IKJEFT01,REGION=0M

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

//OUTPUT   DD SYSOUT=*

//SYSTSPRT DD SYSOUT=*

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



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 <
031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Paul Gilmartin
> Sent: Wednesday, June 22, 2022 12:29 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: SFTP JOB Data parameter
>
> On Wed, 22 Jun 2022 16:06:06 +, Sri h Kolusu wrote:
>
> 
> > > 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 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


Re: SFTP JOB Data parameter

2022-06-22 Thread Farley, Peter x23353
-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Wednesday, June 22, 2022 12:29 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

On Wed, 22 Jun 2022 16:06:06 +, Sri h Kolusu wrote:


> > 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-22 Thread Paul Gilmartin
On Wed, 22 Jun 2022 12:45:56 -0500, Michael Oujesky wrote:

>Might you have the job log from one that had yesterday's data?
>  
And that requires a couple more steps:

One to access that log.

A second to convert it to SFTP and OGET commands  This might bee:
o "sed" which I know fairly well.
o ISPF (which is a pain to use in batch) plus a macro, written perhaps in
  COBOL since most shops discourage use of Rexx in production.
o Pure Rexx (but see above).
o I suspect DFSORT could do it.  I'm DFSORT-naive, but I understand it
  has a wide repertoire of facilities.

>In processes I have built, I did the job build  "today", but
>submitted the job stream "tomorrow" or used a timer facility to delay
>start of execution until "tomorrow" (or days/weeks later).


>At 08:00 AM 6/22/2022, saurabh khandelwal wrote:
>>...
>>echo 'get NonMon_DailyExtract_KWT_'; } | +
>>  sftp -P  eftm...@10.222.xx.xx
>>oget '/u/op117/NonMon_DailyExtract_KWT_'-
>>  'NBFDP.XX.SECURE.DOBMOB.XX.SFTP'

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-22 Thread Michael Oujesky

Might you have the job log from one that had yesterday's data?

In processes I have built, I did the job build  "today", but 
submitted the job stream "tomorrow" or used a timer facility to delay 
start of execution until "tomorrow" (or days/weeks later).


Michael

At 08:00 AM 6/22/2022, saurabh khandelwal wrote:


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=,USER=STCSYS
//STEP0EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=&,DISP=(,PASS),SPACE=(TRK,(1,0)),UNIT=VIO
//SYSINDD DATA,DLM=@@
OSHELL { echo 'lcd /u/op117/';  +
  echo 'cd /3DSecure/KWT/TMP';  +
 echo 'ASCII';  +
echo 'get NonMon_DailyExtract_KWT_'; } | +
 sftp -P  eftm...@10.222.xx.xx
oget '/u/op117/NonMon_DailyExtract_KWT_'-
 'NBFDP.XX.SECURE.DOBMOB.XX.SFTP'
@@
//STEP1EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC
//OUTPUT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DISP=(OLD,PASS),DSN=&


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


Re: SFTP JOB Data parameter

2022-06-22 Thread Paul Gilmartin
On Wed, 22 Jun 2022 16:06:06 +, Sri h Kolusu wrote:

>>> Mr. Natural says, Use the right tool for the job.
>
>Gil,
>
>I agree with the statement, however in this case rexx isn't the right tool.   
>Here are a few reasons I can think off
>
>1.  Most shops discourage the use of REXX in production jobs
>
Cite.  Does IBM itself not distribute production utilities in Rexx?  Do those
same shops encourage the use of TSO in production jobs?
There's probably a COBOL solution.

>2.  In this case the exec is simple , however if your exec needs ISPF services 
>then running REXX in batch is a pain to set up.
>
But "this case" is the OP's requirement.  I've run ISPF in batch.  Most of the 
pain
was eased by copying and modifying a PROCLIB member.

>3.  For smaller input rexx might be good, but it is a poor choice to process 
>large volumes of data.
>
Irrelevant for the OP's dozen or so records.  This is reminiscent of the recent 
dispute here
about optimizing storatge for a small data set.

>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.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-22 Thread Sri h Kolusu
>> Mr. Natural says, Use the right tool for the job.

Gil,

I agree with the statement, however in this case rexx isn't the right tool.   
Here are a few reasons I can think off

1.  Most shops discourage the use of REXX in production jobs
2.  In this case the exec is simple , however if your exec needs ISPF services 
then running REXX in batch is a pain to set up.
3.  For smaller input rexx might be good, but it is a poor choice to process 
large volumes of data.


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.

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
abc
//SORTOUT  DD SYSOUT=*
//SYSINDD *
  OPTION COPY
  INREC BUILD=(C'get NonMon_DailyExtract_KWT_',
   DATE1-1,
   C'.txt',
   80:X)
/*

Will produce  get NonMon_DailyExtract_KWT_20220621.txt

If you want the date with separators it is quite simple. Use DATE1(.)-1, and it 
will produce get NonMon_DailyExtract_KWT_2022.06.21.txt


Thanks,
Kolusu


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


Re: SFTP JOB Data parameter

2022-06-22 Thread Paul Gilmartin
On Wed, 22 Jun 2022 16:00:38 +0300, saurabh khandelwal wrote:
>
>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.
> 
A Rexx approach for "yesterday’s date":
12 *-* B = date( 'Base' )
   >=>   "738327"
13 *-* B = date( 'Standard', B-1, 'Base' )
   >V>   "738327"
   >=>   "20220621"
14 *-* B = translate( 'cd.ef.gh', B, 'abcdefgh' )
   >V>   "20220621"
   >=>   "22.06.21"
15 *-* call lineout , 'get NonMon_DailyExtract_KWT_'||B'.txt'
   >V>   "22.06.21"
get NonMon_DailyExtract_KWT_22.06.21.txt

-- 
Mr. Natural says, Use the right tool for the job.
gil

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


Re: SFTP JOB Data parameter

2022-06-22 Thread Paul Gilmartin
On Wed, 22 Jun 2022 14:53:22 +, Sri h Kolusu wrote:

>>> 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) .
>
>Saurabh,
>
>The date and time are extracted from the system where the job runs.  Are you 
>telling that 2 jobs running on the SAME system are getting different dates ? 
>One job getting current date and other getting yesterday's date?  That is 
>nearly impossible unless 1 job ran after midnight and the other ran on 
>previous day.
> 
At the beginning of this long thread, he said the file is created by Windows
and fetched by TSO.

>Do you need Current date or yesterday's date?
>
"some of the files" needs to be clarified.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-22 Thread Sri h Kolusu
>> 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) .

Saurabh,

The date and time are extracted from the system where the job runs.  Are you 
telling that 2 jobs running on the SAME system are getting different dates ? 
One job getting current date and other getting yesterday's date?  That is 
nearly impossible unless 1 job ran after midnight and the other ran on previous 
day.

Do you need Current date or yesterday's date?

Thanks,
Kolusu

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


Re: SFTP JOB Data parameter

2022-06-22 Thread Paul Gilmartin
On Wed, 22 Jun 2022 16:00:38 +0300, saurabh khandelwal  wrote:
>
>... in some of the files, we are getting yesterday’s date (today’s -1) .
>
Is that because the Windows files are generated before midnight but
the TSO job runs after midnight?

That's a process problem; it can't be fixed in code.

You might be able to fudge the timezone:

533 $ TZ=XyZ11  date '+get NonMon_DailyExtract_KWT_%Y.%m.%d.txt'
get NonMon_DailyExtract_KWT_2022.06.22.txt

534 $ TZ=XyZ-13 date '+get NonMon_DailyExtract_KWT_%Y.%m.%d.txt'
get NonMon_DailyExtract_KWT_2022.06.23.txt

... But it's better to fix the process.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-22 Thread saurabh khandelwal
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=,USER=STCSYS

//STEP0EXEC PGM=EZACFSM1

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

//SYSINDD DATA,DLM=@@

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

  echo 'cd /3DSecure/KWT/TMP';  +

 echo 'ASCII';  +

echo 'get NonMon_DailyExtract_KWT_'; } | +

 sftp -P  eftm...@10.222.xx.xx

oget '/u/op117/NonMon_DailyExtract_KWT_'-

 'NBFDP.XX.SECURE.DOBMOB.XX.SFTP'

@@

//STEP1EXEC PGM=IKJEFT01,REGION=0M

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

//OUTPUT   DD SYSOUT=*

//SYSTSPRT DD SYSOUT=*

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

On Fri, Jun 17, 2022, 17:56 Bill Godfrey  wrote:

> The OP's input to sftp has "lcd /u/op117/"
> and later "get EBC-GOV-mmdd.txt".
> If the "get" command had slashes inside mmdd
> then it would look like this: "get EBC-GOV-/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-mmdd.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 mmdd 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-mmdd.txt'   in this mmdd should be
> >>replace with
> >> year/month/date.
> >
> >My fault, did not read the whole thing.  I just saw mmdd as went with
> that, missed that it needed the "/" in there.
>
> --
> 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


Re: SFTP JOB Data parameter

2022-06-17 Thread Bill Godfrey
The OP's input to sftp has "lcd /u/op117/"
and later "get EBC-GOV-mmdd.txt".
If the "get" command had slashes inside mmdd
then it would look like this: "get EBC-GOV-/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-mmdd.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 mmdd 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-mmdd.txt'   in this mmdd should be
>>replace with
>> year/month/date.
>
>My fault, did not read the whole thing.  I just saw mmdd as went with 
>that, missed that it needed the "/" in there.

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


Re: SFTP JOB Data parameter

2022-06-17 Thread John S. Giltner, Jr.
>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-mmdd.txt'   in this mmdd should be
>replace with
> year/month/date.

My fault, did not read the whole thing.  I just saw mmdd as went with that, 
missed that it needed the "/" in there.

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


Re: SFTP JOB Data parameter

2022-06-17 Thread Paul Gilmartin
On Fri, 17 Jun 2022 06:35:27 -0500, John S. Giltner, Jr.  wrote:

>Actually I think he needs:
>
>  echo `date '+get EBC-GOV-%Y%m%d.txt'`
>
>To get the format of the date he needs.
>
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-mmdd.txt'   in this mmdd should be
replace with
year/month/date.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-17 Thread John S. Giltner, Jr.
Actually I think he needs:

  echo `date '+get EBC-GOV-%Y%m%d.txt'`

To get the format of the date he needs.

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


Re: SFTP JOB Data parameter

2022-06-17 Thread Seymour J Metz
It's the installation management that sets and enforces policy. The rules of 
the installation trump the desires of the submitter, and IBM provides tools to 
enforce those rules. If the installation wishes to delegate the decision to the 
submitter, that is easy to do.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [042bfe9c879d-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, June 16, 2022 12:10 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

On Thu, 16 Jun 2022 14:50:18 +, Seymour J Metz  wrote:

>Only from the perspective of the submitter, not from the perspective of the 
>installation.
>
Which of my two paragraphs are you addrressinig?

In either case, the submitter is the one who cares.

Since (I believe) the system symbol facility antedates the
JCL SET statement, the rule should have been that system
symbols be honored unconditionally in SET with no
compatibility impact.  The programmer could then have used:
// SET jcl-symbol=''
and used  freely subsequently.

>From: Paul Gilmartin
>Sent: Thursday, June 16, 2022 9:27 AM
>
>Doesn't SYMBOLS=({JCLONLY|EXECSYS|CNVTSYS} suffice to resolve that?
>
>There remains the phobia concerning the antiquated use of "&" in temp DSNs.

--
gil

--
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


Re: SFTP JOB Data parameter

2022-06-16 Thread Paul Gilmartin
On Thu, 16 Jun 2022 14:47:00 +, Seymour J Metz wrote:

>Read up on syscalls('ON'), address syscall and address sh.
>
syscalls('ON') can be used in any environment; address sh
requires that the Rexx script have been started from shell amd
is not enabled by syscalls('ON').

I suspect the rationale is that sh requires descriptors 0, 1, and 2.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Paul Gilmartin
On Thu, 16 Jun 2022 14:50:18 +, Seymour J Metz  wrote:

>Only from the perspective of the submitter, not from the perspective of the 
>installation.
> 
Which of my two paragraphs are you addrressinig?

In either case, the submitter is the one who cares.

Since (I believe) the system symbol facility antedates the
JCL SET statement, the rule should have been that system
symbols be honored unconditionally in SET with no
compatibility impact.  The programmer could then have used:
// SET jcl-symbol=''
and used  freely subsequently.

>From: Paul Gilmartin
>Sent: Thursday, June 16, 2022 9:27 AM
>
>Doesn't SYMBOLS=({JCLONLY|EXECSYS|CNVTSYS} suffice to resolve that?
>
>There remains the phobia concerning the antiquated use of "&" in temp DSNs.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Seymour J Metz
Not at all; it's more a case of each poster offering the first solution they 
thought of, which IMHO is appropriate. It's up to the OP to decide which best 
suits his needs.

TMTOWTDI.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Kirk Wolf [k...@dovetail.com]
Sent: Thursday, June 16, 2022 11:13 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

IMO, the contortions in this thread seem to be in search of the most 
complicated solution.
By just using the z/OS UNIX shell in batch, the OP's requirement can be solved 
in a straightforward way.

FWIW, here's how you would do this with Co:Z SFTP and Co:Z Batch, along with 
our sample proc and scripts:

//SFTP EXEC PROC=SFTPPROC  Co:Z SFTP sample proc
//SFTPIN DD *
# This is a z/OS UNIX shell script
# See: 
https://secure-web.cisco.com/1e6tC2pGX9jdX0qpKt1U23CTm05DB7zgn0yrIv3eLICZnPeDHU6w2OfcTld3dgibijWObPkUK_aDzwMTi6GBGtGCvBhkLUIFo_6igWx6NnrGfCHzZKmSFqorjXQeYkJfeFPd3debyxFL-YqlI-iCvXjw7NZUWphRl8vjxQ8GZM3hw70HgtDwSE-Szh3KuTmJ12lmy5adS7H8m6O5ZOtmbt-ukQIPfzfKwbfnAE3iwdNxE8r6WQ0Dr8RklgsmGbdSW27QVHRj412EdXFEMwqzkK9xyNaL6nfGU3gIZIbX-ABgFNW5NkrX0rUPtzelwnBw2CX0zYbxYsD8URhVIhYyKw3B-Cy22l2BhzSLAoPt2wWQzZ1pNq7-qGPgl1wtBV0yQgs5njH8MNN22dNEjXdUWJnSWfQCKfie-BAVE8RFSGBnPUv4R76_GbvEfzawH1ZXw/https%3A%2F%2Fdovetail.com%2Fdocs%2Fsftp%2Fclient.html%23client-batch
#
user=EFTMFGET01
host=10.222.xx.xx
port=
rfile="EBC-GOV-$(sysvar LYYMMDD).txt"

. $script_dir/sftp_connect.sh <http://secure-web.cisco.com/1J3oUu7eT-I8RDyzyGqWhD8Ld7K_gqC5-wv-3NUeJZIzyltFG8AGC6lz6EnA70nmFVCXL0q70QMm3wIEqRUgoiHtk-kFfAaKZ-5yDcam2mrgdw8O1cDCMxUN2fQunj2gh6s8FujHxr_3LfmVngSrr6qQwV3citD8ARj511_3Gx8bj6rL5EaLKUEHGBfOfEjdAVCn3qnBe3u5G1kESm87ZUH3eHv3d_4r_wi_Uvc7mJiX71MZeShkSxeLJ0WQVfp4w-fGTM8_Io4jIcSsQ6DkUdpPMZ9nvvM4vA7W9tSj-sA-bwK5m1mXtCOV1JTnweEPuaoYxIXYGG95eNq--EyDjc4Pn-my9rAFPmY4dw_d3dw2qWW7vbGYedP5J8zFgo6gbMHtIQTqUw6FHZegw65tPEJaMyjZma6a1P3muVI3A8UH1F7Edf-5zd3fpZ-tsbJCE/http%3A%2F%2Fdovetail.com

Co:Z is free to use under the terms of our Community License
http://secure-web.cisco.com/14bwzQ0IYJjdkPGw3LKoFgBWJEmim7drcU4VSzSYaX6mJQ1vV7IHAZdYr6GfCIsoy665KyZXr-dXfRbBCo1-L0I3D-DQO4EjLOc2CbQQtZekIWsmXK-JIIhNm8FTrpO9GWL9ildJTrxcuve0Txvs4sz-96OeSfy_ikTKoba4dXndjqAqBPiEnXczqN_ddWlbmN4ToWE2u7fx06sux80uU8w-wmV1RU_NJoaRtEcImH5Yd-IrL3xK7qyew6le2Xqh5ttelvGpQxu2yboNrh1VUxJir8hhsQh8DE970Ie4QSy1aK3H5iAnk35TtESgItTFnuTfNthNeJBT9fUKu6d6lXbyBTNDMtdzC54V__eYKzt9wiYRvAEu1MHkLYRUpFl3kVKoeecdznuIIurwHll972ZU-YSlsEgBTHrJ1-H5wgtf7q8hfi5I9XAchmIkYBcge/http%3A%2F%2Fdovetail.com%2Fsupport.html



--
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


Re: SFTP JOB Data parameter

2022-06-16 Thread Kirk Wolf
IMO, the contortions in this thread seem to be in search of the most 
complicated solution.
By just using the z/OS UNIX shell in batch, the OP's requirement can be solved 
in a straightforward way.

FWIW, here's how you would do this with Co:Z SFTP and Co:Z Batch, along with 
our sample proc and scripts:

//SFTP EXEC PROC=SFTPPROC  Co:Z SFTP sample proc
//SFTPIN DD *
# This is a z/OS UNIX shell script
# See: https://dovetail.com/docs/sftp/client.html#client-batch
#
user=EFTMFGET01
host=10.222.xx.xx
port=
rfile="EBC-GOV-$(sysvar LYYMMDD).txt"
   
. $script_dir/sftp_connect.sh 

Re: SFTP JOB Data parameter

2022-06-16 Thread Seymour J Metz
Only from the perspective of the submitter, not from the perspective of the 
installation.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [042bfe9c879d-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, June 16, 2022 9:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

On Thu, 16 Jun 2022 13:09:53 +, Seymour J Metz wrote:

>This has been discussed here many times. The issue is that the results vary 
>depending on ehrn and where you evaluate them.
>
Doesn't SYMBOLS=({JCLONLY|EXECSYS|CNVTSYS} suffice to resolve that?

There remains the phobia concerning the antiquated use of "&" in temp DSNs.

--
gil

--
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


Re: SFTP JOB Data parameter

2022-06-16 Thread Seymour J Metz
Read up on syscalls('ON'), address syscall and address sh.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
saurabh khandelwal [sourabhkhandelwal...@gmail.com]
Sent: Wednesday, June 15, 2022 11:31 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

Hello Paul,

If I use rexx then how will I be able to use shell command in same job

On Wed, Jun 15, 2022, 17:08 Paul Gilmartin <
042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 15 Jun 2022 13:11:05 +, Seymour J Metz  wrote:
>
> >Write a REXX script to do the file transfer. You can use the date('S')
> function to generate the date in the format mmdd, then parse out the
> component to build your dsn.
> >
> I would have done something similar.  But the OP was on a promising track,
> however circuitous, even reporting a partial success.  Let's not deflect
> him.
>
> --
> gil
>
> --
> 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

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Seymour J Metz
The issue is when and where to evaluate.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Farley, Peter x23353 [031df298a9da-dmarc-requ...@listserv.ua.edu]
Sent: Wednesday, June 15, 2022 1:26 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

Thanks Sri, I did not know about SYSSYM=ALLOW.  But that raises the question 
why NOT always allow system symbols in every batch initiator?  Allowing them 
just seems like a no-brainer to me, but then I'm just an application programmer 
who expects to be able to use all of the available tools to get the job done.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Wednesday, June 15, 2022 1:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

>> Why is EZACFSM1 required to use  in an instream DD?  Couldn't the OP 
>> just use:

Peter,

Not all shops SYSSYM=ALLOW defined. So if your jobclass is NOT defined to allow 
symbols, the symbols will not be translated.  However with program EZACFSM1 
will translate all the symbols defined to the system.


Thanks,
Kolusu
--

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 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


Re: SFTP JOB Data parameter

2022-06-16 Thread Steve Smith
I wish that IBM had (or would) support the SYMBOLS= keyword on JOB
statements to allow system symbols in the JCL.  The current jobclass spec
would still be the default; and SYMBOLS=JCLONLY would still be the default
default.

sas

On Thu, Jun 16, 2022 at 9:27 AM Paul Gilmartin <
042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

> On Thu, 16 Jun 2022 13:09:53 +, Seymour J Metz wrote:
>
> >This has been discussed here many times. The issue is that the results
> vary depending on ehrn and where you evaluate them.
> >
> Doesn't SYMBOLS=({JCLONLY|EXECSYS|CNVTSYS} suffice to resolve that?
>
> There remains the phobia concerning the antiquated use of "&" in temp DSNs.
>
> --
> gil
>
>

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Paul Gilmartin
On Thu, 16 Jun 2022 13:09:53 +, Seymour J Metz wrote:

>This has been discussed here many times. The issue is that the results vary 
>depending on ehrn and where you evaluate them.
> 
Doesn't SYMBOLS=({JCLONLY|EXECSYS|CNVTSYS} suffice to resolve that?

There remains the phobia concerning the antiquated use of "&" in temp DSNs.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Seymour J Metz
This has been discussed here many times. The issue is that the results vary 
depending on ehrn and where you evaluate them.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
Paul Gilmartin [042bfe9c879d-dmarc-requ...@listserv.ua.edu]
Sent: Thursday, June 16, 2022 8:27 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

On Wed, 15 Jun 2022 17:26:32 +, Farley, Peter x23353  wrote:

>Thanks Sri, I did not know about SYSSYM=ALLOW.  But that raises the question 
>why NOT always allow system symbols in every batch initiator?  Allowing them 
>just seems like a no-brainer to me, but then I'm just an application 
>programmer who expects to be able to use all of the available tools to get the 
>job done.
>
Do thoughtless admins keep sensitive information such as
passwords in system symbols?

Is there a performance concern?

--
gil

--
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


Re: SFTP JOB Data parameter

2022-06-16 Thread Paul Gilmartin
On Wed, 15 Jun 2022 18:31:04 +0300, saurabh khandelwal  wrote:
>
>If I use rexx then how will I be able to use shell command in same job
> 
In this thread, everyone seems to be advocating his favorite utility.
I'll add mine: .
BPXWUNIX is a very flexible tool for issuing UNIX commands from
Rexx in any environment, TSO, IRXJCLL, or OMVS.

You can use the Rexx date() to build the "get" command.

You can then copy the retrieved file elsewhere in the same script.

I never mastered OGET.  IEBGENER suffices for me and does not
impose a requirement of TSO.

One word of caution:  Be sure that your Windows and z/OS are
set to the same timezone (both Windows and z/OS are notoriously
bad at handling timezones), and that your batch job runs on the
same day the file was created.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-16 Thread Paul Gilmartin
On Wed, 15 Jun 2022 17:26:32 +, Farley, Peter x23353  wrote:

>Thanks Sri, I did not know about SYSSYM=ALLOW.  But that raises the question 
>why NOT always allow system symbols in every batch initiator?  Allowing them 
>just seems like a no-brainer to me, but then I'm just an application 
>programmer who expects to be able to use all of the available tools to get the 
>job done.
> 
Do thoughtless admins keep sensitive information such as
passwords in system symbols?

Is there a performance concern?

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-15 Thread Bill Godfrey
My mistake about OGET, it does have the "-".

On Thu, 16 Jun 2022 00:15:23 -0500, Bill Godfrey wrote:

>Your first "echo" doesn't have a "+" at the end like your original did.
>
>Your "OGET" doesn't have a "-" at the end like your original did.
>
>The  symbol generates a 2-digit year, but your filenames use a 4-digit 
>year.
>Instead of  use 
>
>On Thu, 16 Jun 2022 07:45:53 +0300, saurabh khandelwal wrote:
>
>>
>>Now I am getting below error, while running this JCL code.
>>
>>
>>
>>JCL
>>
>>
>>
>>//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=
>>
>>//TAILOR  EXEC PGM=PGM=EZACFSM1
>>
>>//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=,
>>
>>// UNIT=VIO,SPACE=(TRK,(1))
>>
>>//SYSINDD *
>>
>>OSHELL { echo 'lcd /u/op117/';
>>
>>  echo 'cd /FRB/EBCClearing/Staging/tmp';+
>>
>>  echo 'ASCII'; +
>>
>>  echo 'get EBC-GOV-'; } | +
>>
>>sftp -P  eftmfge...@10.222.xx.xx
>>
>>OGET '/u/op117/EBC-GOV-'  -
>>
>>  'NBFDP.DATA.XX.XX.SFTP'
>>
>>//STEP1   EXEC PGM=IKJEFT01,REGION=0M
>>
>>//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
>>
>>//SYSTSIN   DD DSN=,DISP=(OLD,DELETE)
>>
>>//OUTPUT DD SYSOUT=*
>>
>>//SYSTSPRT DD SYSOUT=*
>>
>>/*
>>
>>
>>
>>Output below :
>>
>>
>>
>>READY
>>
>>OSHELL { echo 'lcd
>>/u/op117/';
>>
>> OSHELL RC =  256
>>
>>
>>
>>
>> OSHELL Exit Status =
>>1
>>
>>
>>
>>READY
>>
>>  echo 'cd /FRB/EBCClearing/Staging/tmp';  echo 'ASCII'; echo 'get
>>EBC
>>
>>.22.10
>>
>>COMMAND ECHO NOT
>>FOUND
>>
>>READY
>>
>>OGET '/u/op117/EBC-GOV-220616.txt'
>>'NBFDP.DATA.XX.
>>
>>RETURN CODE 0081, REASON CODE 05620062.  AN ERROR OCCURRED DURING THE
>>OPENIN
>>
>>READY
>>
>>END
>>
>>
>>
>>
>>
>>FSUM7332 syntax error: got EOF, expecting }
>>
>>On Wed, Jun 15, 2022, 21:45 Farley, Peter x23353 <
>>031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:
>>
>>> Thanks again Sri.  After reading those posts, I do see the issue.  That
>>> would be the "Don't break existing jobs" mantra.
>>>
>>> I would instead have said "Go ahead and break them in QA so we can fix the
>>> broken ones", but I don't pay the bills and "breaking them in QA" AssUMes
>>> that QA batch initiator classes are distinct from Production batch
>>> initiator classes, which isn't true at any large shop where I have worked.
>>>
>>> But I agree with Gil's final post in that thread - it should have been
>>> implemented as a new JCL option (similar to EXPORT SYMLIST) rather than an
>>> initiator class parameter.  Positive opt-in for jobs that want to use it,
>>> leave the others alone.  Perhaps a global parameter for the JCL interpreter
>>> to allow or disallow the new JCL option during the initial transition so
>>> shops could choose to allow or disallow use of the new JCL option to
>>> prevent accidental breakage by too-eager programmers until automated SDLC
>>> rules for JCL are updated and enforced.
>>>
>>> Water under the proverbial bridge now.  At least we have EZACFSM1 as an
>>> alternative, so that's good.
>>>
>>> Peter
>>>
>>> -Original Message-
>>> From: IBM Mainframe Discussion List  On Behalf
>>> Of Sri h Kolusu
>>> Sent: Wednesday, June 15, 2022 1:32 PM
>>> To: IBM-MAIN@LISTSERV.UA.EDU
>>> Subject: Re: SFTP JOB Data parameter
>>>
>>> >>> But that raises the question why NOT always allow system symbols in
>>> >>> every batch initiator?  Allowing them just seems like a no-brainer
>>> >>> to me
>>>
>>> Peter,
>>>
>>> There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and
>>> here is a post which explains one of the reason.
>>>
>>> https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html
>>>
>>> Thanks,
>>> Kolusu
>>> --
>>>
>>> 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-15 Thread Bill Godfrey
Your first "echo" doesn't have a "+" at the end like your original did.

Your "OGET" doesn't have a "-" at the end like your original did.

The  symbol generates a 2-digit year, but your filenames use a 4-digit 
year.
Instead of  use 

On Thu, 16 Jun 2022 07:45:53 +0300, saurabh khandelwal wrote:

>
>Now I am getting below error, while running this JCL code.
>
>
>
>JCL
>
>
>
>//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=
>
>//TAILOR  EXEC PGM=PGM=EZACFSM1
>
>//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=,
>
>// UNIT=VIO,SPACE=(TRK,(1))
>
>//SYSINDD *
>
>OSHELL { echo 'lcd /u/op117/';
>
>  echo 'cd /FRB/EBCClearing/Staging/tmp';+
>
>  echo 'ASCII'; +
>
>  echo 'get EBC-GOV-'; } | +
>
>sftp -P  eftmfge...@10.222.xx.xx
>
>OGET '/u/op117/EBC-GOV-'  -
>
>  'NBFDP.DATA.XX.XX.SFTP'
>
>//STEP1   EXEC PGM=IKJEFT01,REGION=0M
>
>//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
>
>//SYSTSIN   DD DSN=,DISP=(OLD,DELETE)
>
>//OUTPUT DD SYSOUT=*
>
>//SYSTSPRT DD SYSOUT=*
>
>/*
>
>
>
>Output below :
>
>
>
>READY
>
>OSHELL { echo 'lcd
>/u/op117/';
>
> OSHELL RC =  256
>
>
>
>
> OSHELL Exit Status =
>1
>
>
>
>READY
>
>  echo 'cd /FRB/EBCClearing/Staging/tmp';  echo 'ASCII'; echo 'get
>EBC
>
>.22.10
>
>COMMAND ECHO NOT
>FOUND
>
>READY
>
>OGET '/u/op117/EBC-GOV-220616.txt'
>'NBFDP.DATA.XX.
>
>RETURN CODE 0081, REASON CODE 05620062.  AN ERROR OCCURRED DURING THE
>OPENIN
>
>READY
>
>END
>
>
>
>
>
>FSUM7332 syntax error: got EOF, expecting }
>
>On Wed, Jun 15, 2022, 21:45 Farley, Peter x23353 <
>031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:
>
>> Thanks again Sri.  After reading those posts, I do see the issue.  That
>> would be the "Don't break existing jobs" mantra.
>>
>> I would instead have said "Go ahead and break them in QA so we can fix the
>> broken ones", but I don't pay the bills and "breaking them in QA" AssUMes
>> that QA batch initiator classes are distinct from Production batch
>> initiator classes, which isn't true at any large shop where I have worked.
>>
>> But I agree with Gil's final post in that thread - it should have been
>> implemented as a new JCL option (similar to EXPORT SYMLIST) rather than an
>> initiator class parameter.  Positive opt-in for jobs that want to use it,
>> leave the others alone.  Perhaps a global parameter for the JCL interpreter
>> to allow or disallow the new JCL option during the initial transition so
>> shops could choose to allow or disallow use of the new JCL option to
>> prevent accidental breakage by too-eager programmers until automated SDLC
>> rules for JCL are updated and enforced.
>>
>> Water under the proverbial bridge now.  At least we have EZACFSM1 as an
>> alternative, so that's good.
>>
>> Peter
>>
>> -Original Message-
>> From: IBM Mainframe Discussion List  On Behalf
>> Of Sri h Kolusu
>> Sent: Wednesday, June 15, 2022 1:32 PM
>> To: IBM-MAIN@LISTSERV.UA.EDU
>> Subject: Re: SFTP JOB Data parameter
>>
>> >>> But that raises the question why NOT always allow system symbols in
>> >>> every batch initiator?  Allowing them just seems like a no-brainer
>> >>> to me
>>
>> Peter,
>>
>> There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and
>> here is a post which explains one of the reason.
>>
>> https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html
>>
>> Thanks,
>> Kolusu
>> --
>>
>> 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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-15 Thread saurabh khandelwal
Dear,



Now I am getting below error, while running this JCL code.



JCL



//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=

//TAILOR  EXEC PGM=PGM=EZACFSM1

//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=,

// UNIT=VIO,SPACE=(TRK,(1))

//SYSINDD *

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

  echo 'cd /FRB/EBCClearing/Staging/tmp';+

  echo 'ASCII'; +

  echo 'get EBC-GOV-'; } | +

sftp -P  eftmfge...@10.222.xx.xx

OGET '/u/op117/EBC-GOV-'  -

  'NBFDP.DATA.XX.XX.SFTP'

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

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

//SYSTSIN   DD DSN=,DISP=(OLD,DELETE)

//OUTPUT DD SYSOUT=*

//SYSTSPRT DD SYSOUT=*

/*



Output below :



READY

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

 OSHELL RC =  256




 OSHELL Exit Status =
1



READY

  echo 'cd /FRB/EBCClearing/Staging/tmp';  echo 'ASCII'; echo 'get
EBC

.22.10

COMMAND ECHO NOT
FOUND

READY

OGET '/u/op117/EBC-GOV-220616.txt'
'NBFDP.DATA.XX.

RETURN CODE 0081, REASON CODE 05620062.  AN ERROR OCCURRED DURING THE
OPENIN

READY

END





FSUM7332 syntax error: got EOF, expecting }

On Wed, Jun 15, 2022, 21:45 Farley, Peter x23353 <
031df298a9da-dmarc-requ...@listserv.ua.edu> wrote:

> Thanks again Sri.  After reading those posts, I do see the issue.  That
> would be the "Don't break existing jobs" mantra.
>
> I would instead have said "Go ahead and break them in QA so we can fix the
> broken ones", but I don't pay the bills and "breaking them in QA" AssUMes
> that QA batch initiator classes are distinct from Production batch
> initiator classes, which isn't true at any large shop where I have worked.
>
> But I agree with Gil's final post in that thread - it should have been
> implemented as a new JCL option (similar to EXPORT SYMLIST) rather than an
> initiator class parameter.  Positive opt-in for jobs that want to use it,
> leave the others alone.  Perhaps a global parameter for the JCL interpreter
> to allow or disallow the new JCL option during the initial transition so
> shops could choose to allow or disallow use of the new JCL option to
> prevent accidental breakage by too-eager programmers until automated SDLC
> rules for JCL are updated and enforced.
>
> Water under the proverbial bridge now.  At least we have EZACFSM1 as an
> alternative, so that's good.
>
> Peter
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Sri h Kolusu
> Sent: Wednesday, June 15, 2022 1:32 PM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: Re: SFTP JOB Data parameter
>
> >>> But that raises the question why NOT always allow system symbols in
> >>> every batch initiator?  Allowing them just seems like a no-brainer
> >>> to me
>
> Peter,
>
> There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and
> here is a post which explains one of the reason.
>
> https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html
>
> Thanks,
> Kolusu
> --
>
> 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 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


Re: SFTP JOB Data parameter

2022-06-15 Thread Farley, Peter x23353
Thanks again Sri.  After reading those posts, I do see the issue.  That would 
be the "Don't break existing jobs" mantra.

I would instead have said "Go ahead and break them in QA so we can fix the 
broken ones", but I don't pay the bills and "breaking them in QA" AssUMes that 
QA batch initiator classes are distinct from Production batch initiator 
classes, which isn't true at any large shop where I have worked.

But I agree with Gil's final post in that thread - it should have been 
implemented as a new JCL option (similar to EXPORT SYMLIST) rather than an 
initiator class parameter.  Positive opt-in for jobs that want to use it, leave 
the others alone.  Perhaps a global parameter for the JCL interpreter to allow 
or disallow the new JCL option during the initial transition so shops could 
choose to allow or disallow use of the new JCL option to prevent accidental 
breakage by too-eager programmers until automated SDLC rules for JCL are 
updated and enforced.

Water under the proverbial bridge now.  At least we have EZACFSM1 as an 
alternative, so that's good.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Wednesday, June 15, 2022 1:32 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

>>> But that raises the question why NOT always allow system symbols in 
>>> every batch initiator?  Allowing them just seems like a no-brainer 
>>> to me

Peter,

There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and here is 
a post which explains one of the reason.

https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html 

Thanks,
Kolusu
--

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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-15 Thread Carmen Vitullo
reading the post sited, at least at my site no user would be allowed by 
security to create a dataset with the SYSTEM NAME as a HLQ or the entire 
dataset name, a discrete or generic TSS or RACF rule would need to be 
defined in a protect all environment - in my site


at my site all job classes are set to syssym allow and we have not seen 
any issues


so use at your own risk I suppose


Carmen

On 6/15/2022 12:31 PM, Sri h Kolusu wrote:

But that raises the question why NOT always allow system symbols in every batch 
initiator?  Allowing them just seems like a no-brainer to me

Peter,

There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and here is 
a post which explains one of the reason.

https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html


Thanks,
Kolusu

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



--
/I am not bound to win, but I am bound to be true. I am not bound to 
succeed, but I am bound to live by the light that I have. I must stand 
with anybody that stands right, and stand with him while he is right, 
and part with him when he goes wrong. *Abraham Lincoln*/


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


Re: SFTP JOB Data parameter

2022-06-15 Thread Michael Oujesky
My guess is that resolution of dynamic symbols can differ each time 
they are interpreted,  In my JCL coding, I use refer-backs so that 
that any dataset is evaluated only once in the JCL.  Further 
references to that dataset do not use the dynamic symbol.


Michael

At 12:26 PM 6/15/2022, Farley, Peter x23353 wrote:
Thanks Sri, I did not know about SYSSYM=ALLOW.  But that raises the 
question why NOT always allow system symbols in every batch 
initiator?  Allowing them just seems like a no-brainer to me, but 
then I'm just an application programmer who expects to be able to 
use all of the available tools to get the job done.


Peter

-Original Message-
From: IBM Mainframe Discussion List  On 
Behalf Of Sri h Kolusu

Sent: Wednesday, June 15, 2022 1:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

>> Why is EZACFSM1 required to use  in an instream 
DD?  Couldn't the OP just use:


Peter,

Not all shops SYSSYM=ALLOW defined. So if your jobclass is NOT 
defined to allow symbols, the symbols will not be 
translated.  However with program EZACFSM1 will translate all the 
symbols defined to the system.



Thanks,
Kolusu
--

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 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


Re: SFTP JOB Data parameter

2022-06-15 Thread Sri h Kolusu
>>> But that raises the question why NOT always allow system symbols in every 
>>> batch initiator?  Allowing them just seems like a no-brainer to me

Peter,

There have been several discussions on IBM-MAIN about SYSSYM=ALLOW and here is 
a post which explains one of the reason.

https://www.mail-archive.com/ibm-main@listserv.ua.edu/msg62638.html


Thanks,
Kolusu

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


Re: SFTP JOB Data parameter

2022-06-15 Thread Farley, Peter x23353
Thanks Sri, I did not know about SYSSYM=ALLOW.  But that raises the question 
why NOT always allow system symbols in every batch initiator?  Allowing them 
just seems like a no-brainer to me, but then I'm just an application programmer 
who expects to be able to use all of the available tools to get the job done.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Wednesday, June 15, 2022 1:15 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

>> Why is EZACFSM1 required to use  in an instream DD?  Couldn't the OP 
>> just use:

Peter,

Not all shops SYSSYM=ALLOW defined. So if your jobclass is NOT defined to allow 
symbols, the symbols will not be translated.  However with program EZACFSM1 
will translate all the symbols defined to the system.


Thanks,
Kolusu
--

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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-15 Thread Sri h Kolusu
>> Why is EZACFSM1 required to use  in an instream DD?  Couldn't the OP 
>> just use:

Peter,

Not all shops SYSSYM=ALLOW defined. So if your jobclass is NOT defined to allow 
symbols, the symbols will not be translated.  However with program EZACFSM1 
will translate all the symbols defined to the system.


Thanks,
Kolusu

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


Re: SFTP JOB Data parameter

2022-06-15 Thread Bonnie Barthel
Yes, it does not do the FTP, it only creates control cards to allow the use of 
system symbols.
https://www.ibm.com/docs/en/zos/2.4.0?topic=considerations-mvs-system-symbols

Bonnie Barthel
Senior IT Specialist
719.649.7888 Mobile
bonnie.bart...@kyndryl.com


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of Sri 
h Kolusu
Sent: Wednesday, June 15, 2022 10:59 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: SFTP JOB Data parameter

>> Can we use PGM=EZACFSM1 with sftp also . I am not sure

Saurabh,

Bonnie meant provide the control cards to symbol translator program EZACFSM1 
and use those translated cards to perform the SFTP.  You use the dynamic system 
symbols for current date.  Here is the link to the symbols 
https://www.ibm.com/docs/en/zos/2.4.0?topic=symbols-dynamic-system 

Something like this

//STEP0EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=&,DISP=(,PASS),SPACE=(TRK,(1,0))
//SYSINDD DATA,DLM=@@
OSHELL { ECHO 'LCD /U/OP117/';  +
 ECHO 'CD /FRB/EBCCLEARING/STAGING/TMP';+
 ECHO 'ASCII';  +
 ECHO 'GET EBC-GOV-MMDD.TXT'; } |   +
 SFTP -P  eftmfge...@10.222.xx.xx<mailto:eftmfge...@10.222.xx.xx>
 OGET '/U/OP117/EBC-GOV-' -
  'NBFDP.DATA.XX.XX.SFTP'
@@
//STEP1EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC
//OUTPUT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DISP=(OLD,PASS),DSN=&


Thanks,
Kolusu


--
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


Re: SFTP JOB Data parameter

2022-06-15 Thread Farley, Peter x23353
Why is EZACFSM1 required to use  in an instream DD?  Couldn't the OP 
just use:

//TSOUSERX JOB . . . 
// EXPORT SYMLIST=*
// SET MYDATE=
//SYSTSIN DD *,SYMBOLS=JCLONLY
CONTROL CARD UISNG 
/*

to substitute that value? (tested using IEBGENER with a SYSUT1 instream and 
SYSUT2 DD SYSOUT=*)

Using symbols in a regular file (Unix or MVS) of course requires EZACFSM1, but 
for an instream control card file it is not required.

Peter

-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Michael Oujesky
Sent: Wednesday, June 15, 2022 11:42 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: SFTP JOB Data parameter

As a starting point:
//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=
//TAILOR  EXEC PGM=PGM=EZACFSM1
//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=,
// UNIT=VIO,SPACE=(TRK,(1)),
// RECFM=FB,LRECL=80,BLKSZE=800
//SYSINDD *
OSHELL { echo 'lcd /u/op117/';
  echo 'cd /FRB/EBCClearing/Staging/tmp';+
  echo 'ASCII'; +
  echo 'get EBC-GOV-'; } | +
sftp -P  eftmfge...@10.222.xx.xx
OGET '/u/op117/EBC-GOV-'  -
  'NBFDP.DATA.XX.XX.SFTP'
//STEP1   EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
//SYSTSIN   DD DSN=,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-mmdd.txt'   in this mmdd 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=
>//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.01Columns 1 00072
>Command ===>  Scroll ===> CSR
>07 OSHELL { echo 'lcd /u/op117/';
>08  echo 'cd /FRB/EBCClearing/Staging/tmp';+
>09  echo 'ASCII'; +
>10  echo 'get EBC-GOV-mmdd.txt'; } | +
>11sftp -P  eftmfge...@10.222.xx.xx
>12 OGET '/u/op117/EBC-GOV-mmdd.txt'  -
>13  'NBFDP.DATA.XX.XX.SFTP'
>
>**  Bottom of Data
>
--

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 lists...@listserv.ua.edu with the message: INFO IBM-MAIN


Re: SFTP JOB Data parameter

2022-06-15 Thread Sri h Kolusu
>> Can we use PGM=EZACFSM1 with sftp also . I am not sure

Saurabh,

Bonnie meant provide the control cards to symbol translator program EZACFSM1 
and use those translated cards to perform the SFTP.  You use the dynamic system 
symbols for current date.  Here is the link to the symbols 
https://www.ibm.com/docs/en/zos/2.4.0?topic=symbols-dynamic-system

Something like this

//STEP0EXEC PGM=EZACFSM1
//SYSOUT   DD DSN=&,DISP=(,PASS),SPACE=(TRK,(1,0))
//SYSINDD DATA,DLM=@@
OSHELL { ECHO 'LCD /U/OP117/';  +
 ECHO 'CD /FRB/EBCCLEARING/STAGING/TMP';+
 ECHO 'ASCII';  +
 ECHO 'GET EBC-GOV-MMDD.TXT'; } |   +
 SFTP -P  eftmfge...@10.222.xx.xx
 OGET '/U/OP117/EBC-GOV-' -
  'NBFDP.DATA.XX.XX.SFTP'
@@
//STEP1EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD DISP=SHR,DSN=SYS1.SBPXEXEC
//OUTPUT   DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN  DD DISP=(OLD,PASS),DSN=&


Thanks,
Kolusu


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


Re: SFTP JOB Data parameter

2022-06-15 Thread Michael Oujesky

As a starting point:
//SFTPSEBC JOB (7330),MSGCLASS=X,CLASS=P,NOTIFY=
//TAILOR  EXEC PGM=PGM=EZACFSM1
//SYSOUT   DD   DISP=(NEW,PASS,DELETE),DSN=,
// UNIT=VIO,SPACE=(TRK,(1)),
// RECFM=FB,LRECL=80,BLKSZE=800
//SYSINDD *
OSHELL { echo 'lcd /u/op117/';
 echo 'cd /FRB/EBCClearing/Staging/tmp';+
 echo 'ASCII'; +
 echo 'get EBC-GOV-'; } | +
   sftp -P  eftmfge...@10.222.xx.xx
OGET '/u/op117/EBC-GOV-'  -
 'NBFDP.DATA.XX.XX.SFTP'
//STEP1   EXEC PGM=IKJEFT01,REGION=0M
//SYSEXEC  DD   DISP=SHR,DSN=SYS1.SBPXEXEC
//SYSTSIN   DD DSN=,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-mmdd.txt'   in this mmdd 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=
//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.01Columns 1 00072
Command ===>  Scroll ===> CSR
07 OSHELL { echo 'lcd /u/op117/';
08  echo 'cd /FRB/EBCClearing/Staging/tmp';+
09  echo 'ASCII'; +
10  echo 'get EBC-GOV-mmdd.txt'; } | +
11sftp -P  eftmfge...@10.222.xx.xx
12 OGET '/u/op117/EBC-GOV-mmdd.txt'  -
13  '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


Re: SFTP JOB Data parameter

2022-06-15 Thread saurabh khandelwal
Dear Bonnie,

Can we use PGM=EZACFSM1 with sftp also . I am not sure

On Wed, Jun 15, 2022, 17:37 Bonnie Barthel 
wrote:

> Look up PGM=EZACFSM1... it may be what you are looking for.
>
> Bonnie Barthel
> Senior IT Specialist
> 719.649.7888 Mobile
> bonnie.bart...@kyndryl.com
>
>
> -Original Message-
> From: IBM Mainframe Discussion List  On Behalf
> Of Paul Gilmartin
> Sent: Wednesday, June 15, 2022 8:08 AM
> To: IBM-MAIN@LISTSERV.UA.EDU
> Subject: [EXTERNAL] Re: SFTP JOB Data parameter
>
> On Wed, 15 Jun 2022 13:11:05 +, Seymour J Metz  wrote:
>
> >Write a REXX script to do the file transfer. You can use the date('S')
> function to generate the date in the format mmdd, then parse out the
> component to build your dsn.
> >
> I would have done something similar.  But the OP was on a promising track,
> however circuitous, even reporting a partial success.  Let's not deflect
> him.
>
> --
> gil
>
> --
> 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
>

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


Re: SFTP JOB Data parameter

2022-06-15 Thread saurabh khandelwal
Hello Paul,

If I use rexx then how will I be able to use shell command in same job

On Wed, Jun 15, 2022, 17:08 Paul Gilmartin <
042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 15 Jun 2022 13:11:05 +, Seymour J Metz  wrote:
>
> >Write a REXX script to do the file transfer. You can use the date('S')
> function to generate the date in the format mmdd, then parse out the
> component to build your dsn.
> >
> I would have done something similar.  But the OP was on a promising track,
> however circuitous, even reporting a partial success.  Let's not deflect
> him.
>
> --
> gil
>
> --
> 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


Re: SFTP JOB Data parameter

2022-06-15 Thread Bonnie Barthel
Look up PGM=EZACFSM1... it may be what you are looking for.

Bonnie Barthel
Senior IT Specialist
719.649.7888 Mobile
bonnie.bart...@kyndryl.com


-Original Message-
From: IBM Mainframe Discussion List  On Behalf Of 
Paul Gilmartin
Sent: Wednesday, June 15, 2022 8:08 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: [EXTERNAL] Re: SFTP JOB Data parameter

On Wed, 15 Jun 2022 13:11:05 +, Seymour J Metz  wrote:

>Write a REXX script to do the file transfer. You can use the date('S') 
>function to generate the date in the format mmdd, then parse out the 
>component to build your dsn.
>
I would have done something similar.  But the OP was on a promising track, 
however circuitous, even reporting a partial success.  Let's not deflect him.

--
gil

--
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


Re: SFTP JOB Data parameter

2022-06-15 Thread Paul Gilmartin
On Wed, 15 Jun 2022 13:11:05 +, Seymour J Metz  wrote:

>Write a REXX script to do the file transfer. You can use the date('S') 
>function to generate the date in the format mmdd, then parse out the 
>component to build your dsn.
>
I would have done something similar.  But the OP was on a promising track,
however circuitous, even reporting a partial success.  Let's not deflect him.

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-15 Thread Paul Gilmartin
On Wed, 15 Jun 2022 15:58:57 +0300, saurabh khandelwal wrote:
>
>Thank for reply but system doesn't take %D as date variable.  It taking as
>file name. So variable in file mmdd not getting replaced with actual
>date
>
%D is not a "date variable".  It is a substitution element in the argument
to the "date" command.

Did you try my suggestion:
date '+get EBC-GOV-%D.txt'
???

>On Wed, Jun 15, 2022, 15:54 Paul Gilmartin wrote:
>> >
>> >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-mmdd.txt'   in this mmdd should be replace with
>> >year/month/date.
>> >
>> # Change:
>> echo 'get EBC-GOV-mmdd.txt'
>>
>> # to
>> date '+get EBC-GOV-%D.txt'

-- 
gil

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


Re: SFTP JOB Data parameter

2022-06-15 Thread Seymour J Metz
Write a REXX script to do the file transfer. You can use the date('S') function 
to generate the date in the format mmdd, then parse out the component to 
build your dsn.


See Chapter 12. FTP Client Application Programming Interface (API), p. 307, in 
z/OS Communications Server 2.5 IP Programmer's Guide and Reference, 
SC27-3659-50.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3


From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
saurabh khandelwal [sourabhkhandelwal...@gmail.com]
Sent: Wednesday, June 15, 2022 6:44 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: SFTP JOB Data parameter

--


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-mmdd.txt'   in this mmdd 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=

//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.01Columns 1
00072

Command ===>  Scroll ===>
CSR

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

08   echo 'cd /FRB/EBCClearing/Staging/tmp';
+

09   echo 'ASCII';
+

10   echo 'get EBC-GOV-mmdd.txt'; } | +

11 sftp -P  eftmfge...@10.222.xx.xx


12 OGET '/u/op117/EBC-GOV-mmdd.txt'  -

13   '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


Re: SFTP JOB Data parameter

2022-06-15 Thread saurabh khandelwal
Hello Paul,

Thank for reply but system doesn't take %D as date variable.  It taking as
file name. So variable in file mmdd not getting replaced with actual
date

On Wed, Jun 15, 2022, 15:54 Paul Gilmartin <
042bfe9c879d-dmarc-requ...@listserv.ua.edu> wrote:

> On Wed, 15 Jun 2022 13:44:43 +0300, saurabh khandelwal  wrote:
> >
> >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-mmdd.txt'   in this mmdd should be replace with
> >year/month/date.
> >
> # Change:
> echo 'get EBC-GOV-mmdd.txt'
>
> # to
> date '+get EBC-GOV-%D.txt'
>
> >
> >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=
> >//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.01Columns 1
> >00072
> >
> >Command ===>  Scroll ===>
> >CSR
> >
> >07  OSHELL { echo 'lcd /u/op117/';
> >+
> >
> >08   echo 'cd /FRB/EBCClearing/Staging/tmp';
> >+
> >
> >09   echo 'ASCII';
> >+
> >
> >10   echo 'get EBC-GOV-mmdd.txt'; } | +
> >
> >11 sftp -P  eftmfge...@10.222.xx.xx
> >
> >
> >12 OGET '/u/op117/EBC-GOV-mmdd.txt'  -
> >
> >13   'NBFDP.DATA.XX.XX.SFTP'
> >
> >**  Bottom of Data
> >
>
> --
> gil
>
> --
> 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


Re: SFTP JOB Data parameter

2022-06-15 Thread Paul Gilmartin
On Wed, 15 Jun 2022 13:44:43 +0300, saurabh khandelwal  wrote:
>
>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-mmdd.txt'   in this mmdd should be replace with
>year/month/date.
>
# Change:
echo 'get EBC-GOV-mmdd.txt'

# to
date '+get EBC-GOV-%D.txt'

>
>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=
>//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.01Columns 1
>00072
>
>Command ===>  Scroll ===>
>CSR
>
>07  OSHELL { echo 'lcd /u/op117/';
>+
>
>08   echo 'cd /FRB/EBCClearing/Staging/tmp';
>+
>
>09   echo 'ASCII';
>+
>
>10   echo 'get EBC-GOV-mmdd.txt'; } | +
>
>11 sftp -P  eftmfge...@10.222.xx.xx
>
>
>12 OGET '/u/op117/EBC-GOV-mmdd.txt'  -
>
>13   'NBFDP.DATA.XX.XX.SFTP'
>
>**  Bottom of Data
>

-- 
gil

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