On Thu, Apr 27, 2017 at 1:26 PM, Ron Thomas <ron5...@gmail.com> wrote:
> we are looking at copy the file to a GDG, once it reaches the z/OS > directory using the below job. so what i am looking is how we can automate > this job so once file reaches the unix directory it copies and delete the > source ? > > //COPYSTEP EXEC PGM=IKJEFT01 > //FILE DD PATH='/export/home/PX1COMT/test.txt' > //PTST DD DISP=SHR,DSN=PTHMICST.TEST.R1.Y(+1) > //SYSTSPRT DD SYSOUT=* > //SYSTSIN DD * > OCOPY INDD(FILE) OUTDD(PTST) TEXT > > what i am thinking is scheduling the job at different time of the day . is > this a good option or there is any other way to do it ? > That is basically the only method that I know of which does not require using an SMF IEFU8n exit to trap SMF record type 92, subtype 11 (file closed) or type 14 (file renamed). I wish that IBM had something equivalent to the Linux "inotify" system. That is an API which allows a daemon (such as "icrond") to monitor one or more files or directory for changes. The "icrond" is a daemon somewhat akin to "icron" which makes it easier to say "if this file/directory changes run this command/script". > Regards > Ron T > > -- Advertising is a valuable economic factor because it is the cheapest way of selling goods, particularly if the goods are worthless. -- Sinclair Lewis Maranatha! <>< John McKown ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN