Posted: Wed Sep 28, 2005 6:39 am Post subject: Creating GDG file with record count
Hi,
I have a GDG file for which I need to create a count file. The count file name should contain the name of the GDG file with the no. of records present in the GDG file. For eg: If the GDG file name is PROD.ASOS030Z.NEWNVDR.OUT.G1328V00 and if it has 289 records, then the count file should be created in the following format with all the records copied from the old file to the new file:
PROD.ASOS030Z.NEWNVDR.OUT.G1328V00.289.
Please let me know how to achieve this.
Is it possible to create a new version of the GDG itself with the record count? If so how?
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Sep 28, 2005 6:52 am Post subject:
Vkphani,
There are a couple of problems with your approach.
1. You cannot create a DATASET with a node which starts with a numeric. So you cannot have the numeric count as one of the node. you need to have a alphanumeric variable
i.e
Quote:
PROD.ASOS030Z.NEWNVDR.OUT.G1328V00.C289.
2. Once you create the GDG like this, you are de-linking the gdg generation from the base. your generations are no way linked to the base and treated as normal sequential datasets.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Wed Sep 28, 2005 8:16 am Post subject:
Vkphani,
The following JCL will give you the desired results. A brief explanation of the JOb. we dynamically create a new job to create a new dataset with a node to have count of the dataset and submit to the intrdr.
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Wed Sep 28, 2005 8:27 am Post subject:
vkphani,
The other way to create a filename dynamically is to create a dataset with some name and then use IDCAMS RENAME to rename the GDG version to the new name.
Use SORT or COBOL or any other programming language or tool to create the IDCAMS controlcard dynamically. This dynamic control card will then be passed to the next step which will be IDCAMS.
This way you can accomplish the result in just 1 job.
I think a similar post is already availbale in this forums. My system is tooooo slow now. We are doing some performance testing over our servers. Soooo...Please search and let me know.
Thanks a lot for your replies and help.
Actually this question was asked by one of my collegue and that guy was given with this task to create the files.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum