Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Help in creating files dynamically

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Mon Dec 01, 2008 6:08 pm    Post subject: Help in creating files dynamically
Reply with quote

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
View user's profile Send private message

ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Dec 01, 2008 6:11 pm    Post subject:
Reply with quote

What do you mean by dynamically ? Go for GDG's ...
Back to top
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Mon Dec 01, 2008 6:14 pm    Post subject: Reply to: Help in creating files dynamically
Reply with quote

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
View user's profile Send private message
ashimer

Active Member


Joined: 13 Feb 2004
Posts: 551
Location: Bangalore

PostPosted: Mon Dec 01, 2008 6:25 pm    Post subject:
Reply with quote

You can use NOEMPTY for GDG so that once the limit is reached it deletes the oldest version ... this should be done if you do not require the older versions anymore ....

Refer , if you are using enterprise cobol ...

http://expertanswercenter.techtarget.com/eac/knowledgebaseAnswer/0,295199,sid63_gci1069896,00.html
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Dec 01, 2008 6:57 pm    Post subject: Re: Reply to: Help in creating files dynamically
Reply with quote

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
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Mon Dec 01, 2008 7:06 pm    Post subject: Reply to: Help in creating files dynamically
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Mon Dec 01, 2008 8:03 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Mon Dec 01, 2008 8:12 pm    Post subject:
Reply with quote

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 icon_sad.gif
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Mon Dec 01, 2008 8:16 pm    Post subject: Reply to: Help in creating files dynamically
Reply with quote

Like I posted previously, there are plenty of existing topics that address the issue of dynamic file allocations in COBOL. Here's a few:

http://www.ibmmainframes.com/viewtopic.php?t=36069&highlight=dynamic
http://www.ibmmainframes.com/viewtopic.php?t=35005&highlight=dynamic
http://www.ibmmainframes.com/viewtopic.php?t=24036&highlight=dynamic
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Mon Dec 01, 2008 10:22 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Roshnii

New User


Joined: 30 Sep 2008
Posts: 45
Location: bangalore

PostPosted: Tue Dec 02, 2008 6:55 pm    Post subject: Reply to: Help in creating files dynamically
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Tue Dec 02, 2008 9:32 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts Creating ISPF Screens with Scrname vi... Albireo20 TSO/ISPF 9 Tue Sep 05, 2017 4:24 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts Changing sort Card Dynamically vickey_dw DFSORT/ICETOOL 5 Sat Aug 19, 2017 2:33 pm
No new posts Match two files using multiple keys a... santoshks1987 SYNCSORT 11 Fri Aug 18, 2017 10:50 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us