On Sat, Jul 26, 2014 at 2:02 PM, Rajesh Janakiraman
<[email protected]> wrote:
> Hi Elardus,
>
> There is a dataset which get updated every hour in our production system,
> actually i need to ftp that particular dataset every one hour.
>
> For now i'm submitting the job manually by changing the date and time for
> every one hour.
>
> I'm not clearly aware of wildcard datasets that can be given as a input DSN
> in JCL.
>
> Input dataset name is same, but I need to get output using wildcard in JCL
> with different time on hourly basis.
>
> for example, in ftp sysin----> *//PUT 'default_file_name' date_time.txt*
>
> date_time.txt should be like 140727_0900.txt @ 09:00 AM
>

Ah! Much easier question to answer

//PS001   EXEC PGM=BPXBATCH,REGION=0M
//STDOUT DD SYSOUT=*
//STDERR DD SYSOUT=*
//STDIN DD PATH='/dev/null',
// PATHOPTS=(ORDONLY)
//STDPARM DD *
SH filename=$(date +'%y%m%d_%H%M') \
echo <<EOF \
userid \
password \
put 'INPUT.DATASET.NAME' ${filename}.txt \
EOF | ftp server_name
/*
//

The above shows how to ftp a specific z/OS sequential dataset whose
name is INPUT.DATASET.NAME into a file on the server whose file name
is of the form <yy><mm><dd>_<hh><mm>.txt where the things in <> marks
are the date and time when the step runs.

You can do something equivalent in REXX too. But it takes two steps.
And the REXX program must reside in a PDS, not be "in stream". It
would create an output DSN which you could then concatenate into the
//INPUT DD statement of the FTP step later in the job.

But I need to get ready to leave for a couple of hours, so I won't try
to fake up the REXX program.


<snip>
>
> --
> Regards,
> *Rajesh Janakiraman*
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN



-- 
There is nothing more pleasant than traveling and meeting new people!
Genghis Khan

Maranatha! <><
John McKown

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

Reply via email to