View previous topic :: View next topic
|
Author |
Message |
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
Hi,
I need to create files dynamically.
My requirement is to create account files for customers. There can be many number of customers and each customer can have many accounts.
So my job runs each day and I dont know how many customers apply for account details each day and for how many accounts.
Now for each account, I need to create a file. So I need to create file a number of files dynamically.
Can anyone please tell me how to create files dynamically? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
|
|
What do you mean by dynamically ? Go for GDG's ... |
|
Back to top |
|
|
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
But GDG's can have maximun 255 generations. What if I need more files than that? How do I go about that? |
|
Back to top |
|
|
ashimer
Active Member
Joined: 13 Feb 2004 Posts: 551 Location: Bangalore
|
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Roshnii wrote: |
But GDG's can have maximun 255 generations. What if I need more files than that? How do I go about that? |
That's not exactly true. The maximum value for LIMIT is 255. There are four digits available for the generation portion of the GDG (GnnnnVnn) so you can have up to 9999 generations cataloged before the generation value rolls back around to 0001.
See 3.10.2 Absolute Generation and Version Numbers from the z/OS V1R9.0 DFSMS Using Data Sets manual.
However, there are plenty of topic in this forum that show how to dynamically allocate datasets from within a COBOL program. |
|
Back to top |
|
|
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
The risk is I dont know what will be the maximum no of files. It may go beyond 9999.
So using GDG's may be a possible risk. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
The risk is I dont know what will be the maximum no of files. It may go beyond 9999. |
Uh, you're not designing your system to allocate all of these at one time, I hope? If so, you're going to run into system limits way before you get to 9999 dynamic allocations -- TIOT size limits DD statements per job to 3273, for example. |
|
Back to top |
|
|
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
oh. No not at one time.
How do you create GDG's with more than 255 generations. I tried but I cound not do that. The maximum limit is 255.
i am using cobol z/OS 3.4.1 .
Ok, Now I cannot create GDG's ... so what I need is some way of creating file dynmically . Any help |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
How large will these user file be? How many files could there be for the same user at the same time? How will these file be used once created?
You might be better served if you created members in a pds rather than separate files for each user. . . |
|
Back to top |
|
|
Roshnii
New User
Joined: 30 Sep 2008 Posts: 45 Location: bangalore
|
|
|
|
Thanks superK for the links. I went through them.
I tried using PUTENV for creating dynamic files and I have a question.
Can i create more than 255 files/ddnames during one run of my program using PUTENV?
dick scherrer,
creating members in a PDS seems to be a nice idea.How do I go about creating members in a PDS.
But here the file length will be 80 only right |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
But here the file length will be 80 only right |
Not necessarily. Many partitioned datasets have 80-byte lengths, but that is so that they are compatible with "card" image control statements, jcl, etc.
One of my pds definitions uses a length of 4096 with no problem. |
|
Back to top |
|
|
|