Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Logic to solve this issue

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

New User


Joined: 15 Sep 2008
Posts: 36
Location: Bangalore

PostPosted: Wed Sep 17, 2008 7:37 pm    Post subject: Logic to solve this issue
Reply with quote

Hi Can anybody please tell me a logic to overcome this issue.

I have two gdg files getting processed in each run, but when one of the gdg file is not created on any particular day the other is getting processed with the old version of another gdg file. This should be avoided.

I mean to say that if a GDG file is not created on any particular day the other file should be processed with the empty file and not the old version of that file.
Back to top
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 17, 2008 7:47 pm    Post subject:
Reply with quote

Step 1 - processes the whole GDG base

Step 2 - Copies the whole GDG base to a backup file

Step 3 - deletes all entries in the GDG base

Step 4 - Setup a null +1 generation of the GDG base
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Wed Sep 17, 2008 7:49 pm    Post subject:
Reply with quote

Vinay N.G

Pre allocate empty generations and use those in your job.

BTW, are both the generations getting created in the same job? can you mention the possible scenarios where the gdg is not getting created at all.

Thanks,
Arun
Back to top
View user's profile Send private message
Vinay N.G

New User


Joined: 15 Sep 2008
Posts: 36
Location: Bangalore

PostPosted: Wed Sep 17, 2008 8:04 pm    Post subject:
Reply with quote

Hi Arcvns,

No both GDG files are not getting created in the same job.
one of the file comes frm business infact... if they dnt provide tht file at any particular day old generation is being processed.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2276
Location: @my desk

PostPosted: Wed Sep 17, 2008 8:20 pm    Post subject:
Reply with quote

Vinay,
Quote:
one of the file comes frm business infact

What about the other file? Still I m not clear how you are creating these 2 generations daily.

You can always follow the steps pointed out by expat

Thanks,
Arun
Back to top
View user's profile Send private message
Vinay N.G

New User


Joined: 15 Sep 2008
Posts: 36
Location: Bangalore

PostPosted: Wed Sep 17, 2008 8:40 pm    Post subject:
Reply with quote

Ok consider both the files are being sent from Business and sometimes they send only one file
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 17, 2008 8:51 pm    Post subject: Reply to: Logic to solve this issue
Reply with quote

This might be a rare experience to take advantage of the version rather than the generation.

Process the generation by explicit name (HLQ.WHATEVER.GnnnnV00). When finished, rename the generation by changing the version number (RENAME HLQ.WHATEVER.GnnnnV00 to HLQ.WHATEVER.GnnnnV01). This will indicate to your application that the generation has already been processed and to not use it again.

Or, can you just create a log of the last generation processed and have your application automatically skip any generation already in the log file?
Back to top
View user's profile Send private message
Vinay N.G

New User


Joined: 15 Sep 2008
Posts: 36
Location: Bangalore

PostPosted: Wed Sep 17, 2008 8:59 pm    Post subject:
Reply with quote

Hi Superk,
Can you please tell me how the application will come to know that it has already been processed, do we need to chnage the logic in application also.
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Wed Sep 17, 2008 10:03 pm    Post subject: Reply to: Logic to solve this issue
Reply with quote

I don't know if I can answer your question, since I don't know anything about your application. If it was me, I would:

- List all of the generations cataloged to the GDG base.
- Exclude all of the GDG's in the list that have a version of V00.
- If the resulting list is empty, then exit and stop any further processing.
- If there are still entries in the list, then select the name of the first GDG from the list, and pass that on the the rest of the application. Repeat until there are no more generations left to be processed.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Wed Sep 17, 2008 10:21 pm    Post subject:
Reply with quote

Sorry Kevin, but your solution seems more complicated than is required. Renanimg absolute generations then working on logic to include/exclude unrenamed files.

What is wrong with processing the whole GDG base and then deleting the entries, to then set up a null +1 ready for the next cycle. A few simple JCL additions and there you go.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Wed Sep 17, 2008 10:30 pm    Post subject: Reply to: Logic to solve this issue
Reply with quote

I am not giving a solution icon_sad.gif

/venting on
I am just making a consideration about a generalized very poor application design

there are too many posts asking on how to skip a step in case the input dataset is empty

( seen it done it ) such approach will fail any serious application quality auditing

the main paradigm is that all the steps of a procedure should run succesfully
even if the input datasets are empty...

it is easier to allocate all the datsets needed and prime them with an end of file
rather then checking the datasets for existance or emptyness and skip some steps

the issue is evident when using gdg' s and not preallocating the current datasets

/venting off

the issue is evident for ledger applications ( legal isues )
the procedure should run even with an empty transaction dataset
and show on the daily journal 0 transactions and unchanged balances
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Sep 18, 2008 4:20 am    Post subject:
Reply with quote

Hi,

1. create 2 empty GDG's so files are available for 1st run.

2. run job reading 0 & -1 files and once processed, initialise 2 files +1 & +2.

Now you will never process an old GDG.


Gerry
Back to top
View user's profile Send private message
Bharath Bhat

Active User


Joined: 20 Mar 2008
Posts: 283
Location: chennai

PostPosted: Thu Sep 18, 2008 11:09 am    Post subject:
Reply with quote

expat wrote:
Step 1 - processes the whole GDG base

Step 2 - Copies the whole GDG base to a backup file

Step 3 - deletes all entries in the GDG base

Step 4 - Setup a null +1 generation of the GDG base


We did the same thing when we had a similiar issue....
And it is working fine..... icon_cool.gif
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 Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Execessive parameter issue Sumeendar JCL & VSAM 5 Mon Dec 19, 2016 4:35 pm
No new posts DFHRESPONSE returns issue divated CICS 3 Wed Nov 02, 2016 6:32 pm
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us