Problem has been resolved by adding CLIST into my current code  and called
my JCL as parm.
in this cose i used SYSDATE and SYSTIME variable and solved issue.


PROC 0
CONTROL MSG
SET MYDATE  =  ....
SET MYTIME = ..

SET DATE = &MYDAT&MTIME

PUT 'TEST1.PR.BAS'    '/sftp/file/tstpre.np&DATE'

OSHELL { echo 'lcd /sftp/file/' ; +

         echo 'bin'; +

         echo '!chmod 660 tstpla.np'; +

         echo 'cd C:\SFTP';  +

         echo 'mput tstpla.np'   ; +

         echo 'lcd /sftp/file/' ; +

         echo '!rm -r /sftp/file/tstpla.np' ; +

       sftp -p -v [email protected]. <[email protected]>125


Thanks you so much for help .



On Thu, Nov 16, 2017 at 5:33 AM, David Crayford <[email protected]> wrote:

> On 16/11/2017 3:27 AM, Wayne Bickerdike wrote:
>
>> Another pathological dig at REXX David?
>>
>> The OP says, "I will use this code into one member and called by JCL as
>> input"
>>
>
> Not at all, Wayne. I asked because the OP is using SFTP (not FTP) and Kirk
> provided far and away the best solution in the form of a shell script
> that runs in batch.
>
> My example was how I generate a date/time suffix for our remote ftp backups
>> and delete aged ones.
>>
>> Much as you hate REXX, it works and it's pervasive.
>>
>
> I don't hate REXX. It's useful for many purposes. I just find I prefer the
> power and expressiveness of modern languages. Simple things like the lack
> of lexical scoping and short circuit evaluation make programming in REXX
> unpleasant for me.
>
>
>
>> On Wed, Nov 15, 2017 at 8:30 PM, David Crayford <[email protected]>
>> wrote:
>>
>> Why does he need REXX? Is he running it from a TSO command line?
>>>
>>>
>>>
>>> On 14/11/2017 3:11 AM, Lizette Koehler wrote:
>>>
>>> I think Venkat has a few issues to solve
>>>>
>>>>      1) File is on the mainframe
>>>>      2) He needs to add an LLQ on the Windows system he is sending the
>>>> file to
>>>>      3) Mainframe date/time is different form Windows date/time
>>>> (example,
>>>> MF in New York but PC is in Singapore, so needs to have the NY
>>>> Date/Time in
>>>> the file name)
>>>>      4) He needs a process that will create a file with the MF Date/Time
>>>> in the file name on the Window
>>>>      5) He needs to determine what the LLQ should look like  e.g.
>>>> 2017-11-11 or 20171111 or 2017307 and so forth.  Same with time
>>>> HHMMSS  or
>>>> HH-MM-SS and so  forth.
>>>>
>>>>
>>>>
>>>> A Rexx or Clist would be able to create a file name with the mf
>>>> date/time
>>>> stamp but only at the run time.  Not necessarily when the file was
>>>> actually
>>>> created on the mainframe.  Second, the FTP needs to place the file on
>>>> the
>>>> windows system with the mf date/time in the file name.
>>>>
>>>> He needs for someone to code this for him as he is not sure how to do
>>>> this process.
>>>>
>>>> I think this summarizes his question so far, if not, he can restated the
>>>> area where I did not understand his requirements
>>>>
>>>> P.S.  I think REXX is the better process for this. But maybe he needs a
>>>> Batch function he can support.
>>>>
>>>> Lizette
>>>>
>>>>
>>>>
>>>>
>>>> -----Original Message-----
>>>>
>>>>> From: IBM Mainframe Discussion List [mailto:[email protected]]
>>>>> On
>>>>> Behalf Of Kirk Wolf
>>>>> Sent: Monday, November 13, 2017 11:55 AM
>>>>> To: [email protected]
>>>>> Subject: Re: CLIST to add LLQ into PS file
>>>>>
>>>>> Sorry! my mailer let my previous post go while I was editing!
>>>>> Let me try again......
>>>>>
>>>>> With Co:Z SFTP, its trivial to use shell scripting in batch to do this.
>>>>>
>>>>> For example:
>>>>>
>>>>> //SFTPPUT EXEC PROC=SFTPPROC
>>>>> //SFTPIN DD *
>>>>> cert="MY-RING:RSA-CERT"
>>>>> user=myuser
>>>>> host=my.windows.host.com
>>>>> lzopts="mode=text,linerule=crlf"
>>>>> lfile=//DD:MYDD
>>>>> suffix=$(date +%Y-%m-%d:%H:%M:%S)
>>>>> rfile="C:\SFTP\testpla.np.$suffix"
>>>>>
>>>>> # This calls a sample batch script which sends lfile to rfile
>>>>>
>>>>> . $script_dir/sftp_put.sh
>>>>>
>>>>> //MYDD  DD DISP=SHR,DSN=....
>>>>> //*
>>>>>
>>>>>
>>>>> Kirk Wolf
>>>>> Dovetailed Technologies
>>>>> http://dovetail.com
>>>>>
>>>>> On Mon, Nov 13, 2017 at 12:49 PM, Kirk Wolf <[email protected]> wrote:
>>>>>
>>>>> With Co:Z SFTP, its trivial to use shell scripting in batch to do this.
>>>>>
>>>>>> For example:
>>>>>>
>>>>>> //SFTPPUT EXEC PROC=SFTPPROC
>>>>>> //SFTPIN DD *
>>>>>> cert="MY-RING:RSA-CERT"
>>>>>> user=myuser
>>>>>> host=myhost
>>>>>> lzopts="mode=text"
>>>>>> lfile=//DD:MYDD
>>>>>> rfile=/etc/profile
>>>>>>
>>>>>> . $script_dir/sftp_put.sh
>>>>>>
>>>>>> //MYDD  DD DSN=COZUSER.SFTPGET.DATA,DISP=(MOD,KEEP),
>>>>>> //        DCB=(LRECL=80,RECFM=FB),SPACE=(CYL,(3,1))
>>>>>> //*
>>>>>>
>>>>>>    date +%Y-%m-%d:%H:%M:%S
>>>>>>
>>>>>> Kirk Wolf
>>>>>> Dovetailed Technologies
>>>>>> http://dovetail.com
>>>>>>
>>>>>> On Mon, Nov 13, 2017 at 12:40 PM, Paul Gilmartin
>>>>>> <0000000433f07816-dmarc- [email protected]> wrote:
>>>>>>
>>>>>> On Mon, 13 Nov 2017 12:33:49 -0600, Kirk Wolf wrote:
>>>>>>
>>>>>>> sftp is a shell command, so it would seem more natural to use a z/OS
>>>>>>>
>>>>>>>> Unix shell script to do what you want.
>>>>>>>>
>>>>>>>> Or Rexx.
>>>>>>>>
>>>>>>> ABC!  (Anything But CLIST.)
>>>>>>>
>>>>>>> -- gil
>>>>>>>
>>>>>>> ------------------------------------------------------------
>>>>>>> ----------
>>>>>>>
>>>>>> 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
>>>
>>>
>>
>>
> ----------------------------------------------------------------------
> 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