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

NDM all GDG version seperately


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Mon Jul 13, 2015 11:43 pm
Reply with quote

Currently I have a job which runs at particular time every day with following steps

Step 1:
1. Merge All GDG versions of File A to a Flat file B.
2. Delete all the existing GDG Versions of A
3. Define a Empty version for GDG A

Step 2:
1. Check the Flatfile B and if is not empty then backup to new GDG C
2. NDM out the Flatfile B and delete it at the end

Now we want to NDM out all the GDG Version of A seperately instead of merging as single file and sending it.
We do not know how many verision of GDG A will be there everyday when this job run. It varies from 0 version to any number everyday. Please let me know how can we adopt this change.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 14, 2015 1:01 am
Reply with quote

Terminology is critical in IT where similar terms may mean very different things. You are not likely to be using versions.

You will need to create a two-step process where the first step determines how many generations (assuming you really meant generations in your post), create JCL with that many steps, and submit the created JCL to the system. The second job will do the transfers.

The current process is simpler to maintain - why does your site think it needs to be changed?
Back to top
View user's profile Send private message
prino

Senior Member


Joined: 07 Feb 2009
Posts: 1306
Location: Vilnius, Lithuania

PostPosted: Tue Jul 14, 2015 1:22 am
Reply with quote

Robert Sample wrote:
The current process is simpler to maintain - why does your site think it needs to be changed?

<cynical mode>
More jobs == higher charge-out?
</cynical mode>
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 446
Location: USA

PostPosted: Tue Jul 14, 2015 1:23 am
Reply with quote

My idea is that you'll be sending separate files in separate steps. So, you will have each gdg file referred in the step as generation 0, -1, -2, .. etc.
You may write the maximum number of steps (=max number of generations) and when any generation is not found then the JCL will give error and will stop there.

Another approach is that you can first check whether the generation exists or not (through IDCAMS) and then proceed depending on the return code of IDCAMS step.

.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 14, 2015 1:46 am
Reply with quote

RahulG31: if the site uses JES3 your first approach will not work as a JCL error for data set not found will occur.
Back to top
View user's profile Send private message
krsenthil85

New User


Joined: 31 Aug 2007
Posts: 55
Location: bangalore

PostPosted: Tue Jul 14, 2015 2:25 am
Reply with quote

prino wrote:
Robert Sample wrote:
The current process is simpler to maintain - why does your site think it needs to be changed?

<cynical mode>
More jobs == higher charge-out?
</cynical mode>


Because the customer wants to recieve the file individually on their mailbox instead of a combined file.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Jul 14, 2015 3:39 am
Reply with quote

In that case, you'll need to use IDCAMS (or whatever similar tool is used at your site), parse the output to identify the different generations, and submit the created JCL to the internal reader. It won't necessarily be a complicated process, but you will have to handle the no generations situation as a special case, probably -- you need at least one executable step in a job.
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 581
Location: London

PostPosted: Tue Jul 14, 2015 2:58 pm
Reply with quote

why not just have an NDM step following the one that creates the GDS in the first place?
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 isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts How to copy the -1 version of a membe... TSO/ISPF 4
No new posts Copying GDG version(all/few) from pro... CLIST & REXX 13
No new posts XMITIP Latest Version JCL & VSAM 2
No new posts How to determine TLS/SSL version in m... TSO/ISPF 2
Search our Forums:

Back to Top