IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to process dependent file based on time interval?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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 Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Sun Sep 06, 2020 2:04 pm
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: 2455
Location: Hampshire, UK

PostPosted: Sun Sep 06, 2020 5:20 pm
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: 3048
Location: NYC,USA

PostPosted: Tue Sep 08, 2020 7:54 pm
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
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 Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Thu Sep 10, 2020 1:56 pm
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: 3048
Location: NYC,USA

PostPosted: Fri Sep 11, 2020 3:39 am
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
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: 3048
Location: NYC,USA

PostPosted: Mon Sep 21, 2020 2:12 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
No new posts To get the the current time DFSORT/ICETOOL 13
Search our Forums:

Back to Top