Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Dynamic file allocation

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Dynamic file allocation
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: 8117
Location: East Dubuque, Illinois, USA

PostPosted: Thu Feb 19, 2009 6:05 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Thu Feb 19, 2009 6:06 pm    Post subject:
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: 2284
Location: @my desk

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

Hello,

Could this be of some help?

http://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: 51

PostPosted: Fri Feb 20, 2009 2:47 pm    Post subject: Reply to: Dynamic file allocation
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: 8593
Location: Back in jolly old England

PostPosted: Fri Feb 20, 2009 2:55 pm    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us