Portal | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to process dependent file based on time interval?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
HithaSri

New User


Joined: 06 Sep 2020
Posts: 4
Location: India

PostPosted: Sun Sep 06, 2020 12:42 pm    Post subject: How to process dependent file based on time interval?
Reply with quote

Does any one know of a way to loop a step in JCL as per my requirement. My requirement is that step 10 output file of my JCL will send to an other team(for example TEAM-B) for futher processing and the job need to wait until a new file created by TEAM B and then my JCL execute step20 with a file created by team B.

Here my question is in between Step10 and Step20 my job need to check for availability of file 5 equal intervals though IDCAMS.

For Example 1 interval = 1 min or 60 sec

My step need to check five time for file on every 2 min.

If in the firsrt step file was find by IDCAMS in first interval or after 2 min WAIT step...then job need to execute Step20 directly. If not job need to wait for 2 more min or second interval time and process IDCAMS step again for file availability. Proceess must be repeated until 5 intervals if the file was not find. If the file was not created after 5th interval, THEN job will send notification mail that file was not created

Notes: Here, first step10 of my job working based on DSN- Triggered. So i can't add DSN- Trigger one more time...for that I need to spilt JCL. But I can't do that because this process need applied for huge number of jobs almost 10k so I can't create 10K more jobs by splitting job

I really need someone's help to make this requirement so optimal and better way. Any new suggestions are welcome to achive it in optimal way through ONE JCL..
Back to top
View user's profile Send private message

Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 386
Location: Denmark

PostPosted: Sun Sep 06, 2020 2:04 pm    Post subject:
Reply with quote

You can not loop in JCL. JCL is neither a programming nor a scripting language. You will need a proper program to do what you want.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2407
Location: Hampshire, UK

PostPosted: Sun Sep 06, 2020 5:20 pm    Post subject: Reply to: How to process dependent file based on time interval?
Reply with quote

Why not split your job into two parts? Part 1 creates and sends the dataset (it is NOT a file). Part 2 gets submitted by the scheduler when the dataset from the other team arrives.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2467
Location: NY,USA

PostPosted: Tue Sep 08, 2020 7:54 pm    Post subject:
Reply with quote

Explore REXX or assembler solution to write a module and delay or call or check creation date and put them all in a proc and use it.
Back to top
View user's profile Send private message
HithaSri

New User


Joined: 06 Sep 2020
Posts: 4
Location: India

PostPosted: Thu Sep 10, 2020 3:50 am    Post subject: Reply to: How to process dependent file based on time interval?
Reply with quote

Hi All,

Thank you for your time on this.

Hi Nic,

I can't split job because the above entire process should be created in Proc (Ex: PROC-A) not in JCL..And the PROC-A needs call by huge number of jobs. So, We can't add trigger step proc.

Hi Rohit,
Can you be more clear or any other information or link or any video link?
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 386
Location: Denmark

PostPosted: Thu Sep 10, 2020 1:56 pm    Post subject:
Reply with quote

A procedure is JCL.
It sounds like a pretty simple REXX script using the SYSDSN function. Only challenge I see is thatt REXX does not have a wait function, but the following will do:
Code:
 call syscalls 'ON'             
 address syscall 'sleep' secs   
 call syscalls 'OFF'
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2467
Location: NY,USA

PostPosted: Fri Sep 11, 2020 3:39 am    Post subject:
Reply with quote

A piece of that is shared by Willy. If you do some research then you shall find how to delay using program and once you do just repeat that step in the proc and each time check the creation date of the data set and when it’s today just set some tc and jump on step20 else after 5 tries send an email and bypass step20.
Back to top
View user's profile Send private message
HithaSri

New User


Joined: 06 Sep 2020
Posts: 4
Location: India

PostPosted: Mon Sep 21, 2020 1:00 am    Post subject:
Reply with quote

Hi Everyone,

Thank you very much on you assistance.

I am done with this part.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 2467
Location: NY,USA

PostPosted: Mon Sep 21, 2020 2:12 am    Post subject:
Reply with quote

That’s great to know you had a solution to the problem but it’s more appreciated if you could share your approach which will help others in future.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TWS - ETT File triggering does not wo... me00266 IBM Tools 4 Mon Sep 07, 2020 11:58 pm
No new posts EIBRESP =16 & EIBRESP2 = 01 while... Farheen CICS 4 Mon Aug 24, 2020 2:05 pm
This topic is locked: you cannot edit posts or make replies. SORT the records based on the second ... Ramsee SYNCSORT 1 Wed Aug 19, 2020 3:01 pm
No new posts Dynamic file read via JCL abdulrafi JCL & VSAM 4 Fri Aug 14, 2020 11:51 am
No new posts to Insert Rows from File1 to File 2 ... Arun_Tupili DFSORT/ICETOOL 1 Thu Aug 13, 2020 6:22 pm

Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us