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

Dynamic file allocation


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

New User


Joined: 03 Mar 2008
Posts: 5
Location: pune

PostPosted: Thu Feb 19, 2009 6:01 pm
Reply with quote

Hi All,

I have an input file. I want to split that input file into number output generations. My output file can have max of 5000 records. Based of the record count of the input file, is it possible to decide the number of generations of a GDG to be created.

For example:

If the input file has 14000 record, I need to create 3 generations of output GDG.
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: Thu Feb 19, 2009 6:05 pm
Reply with quote

Write a program to count the records and generate the appropriate JCL, which is then copied to the internal reader for submission. Since JCL is set when submitted, you cannot dynamically change it once submitted -- so doing this in a single job is not possible.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Feb 19, 2009 6:06 pm
Reply with quote

Or search the DFSORT forum, because this has been asked before.
Back to top
View user's profile Send private message
Arun Raj

Moderator


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

PostPosted: Thu Feb 19, 2009 8:29 pm
Reply with quote

Hello,

Could this be of some help?

ibmmainframes.com/viewtopic.php?t=34987
Back to top
View user's profile Send private message
picus_mf
Warnings : 1

New User


Joined: 09 Jun 2006
Posts: 52

PostPosted: Fri Feb 20, 2009 2:47 pm
Reply with quote

I have attached a PDF file. It explains the concept of Dynamic file allocation in COBOL using environment variables and external routine.
I haven't tried this yet.

Thanks.

Deleted until permission supplied......
TECHNICAL SUPPORT - DECEMBER 2001 wrote:
Copyright 2001 Technical Enterprises, Inc. Reproduction of this document without permission is prohibited.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Feb 20, 2009 2:55 pm
Reply with quote

Please DO NOT use attachments as not everybody is permitted to open these.

This can seriously damage your chances of getting help when needed.
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Mon Feb 23, 2009 11:29 am
Reply with quote

Hi Picus_mf,

Just copying the PDF doesn't solve the problem ....... dynamic allocation of file means you have to allocate a file in program itself.

We do not give details of output file in ( when dynamically allocating) :
FILE-CONTROL.
FILE SECTION and DD JOB statement.

Provide a code in which we can allocate file and use the created file in other job steps......



Thanks,
Jaspal Virk
9923696840
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon Feb 23, 2009 8:49 pm
Reply with quote

jaspal where in the requirements from gopugn did you see anything about PDF? How do you know that gopugn needs to use the dynamically allocated files in another step?
Back to top
View user's profile Send private message
jaspal

New User


Joined: 22 May 2007
Posts: 68
Location: mumbai

PostPosted: Mon Feb 23, 2009 9:45 pm
Reply with quote

Douglas we can use that file in other step or not that doesnt matter....we can if we want....... if we are allocating a file dynamically then it should have some use.......?
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue Feb 24, 2009 1:16 am
Reply with quote

Jaspal, I would expect that gopugn could allocate a file (probably with disp new, catalog, delete) open the file, write to it, close it, free it then repeat this process. All in the same step.

What gopugn might want to do with these files in other steps of the job and other jobs has not been specified in the posting. Or do you work with gopugn and know more of the specifications? Maybe that is why you used the “We".
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top