View previous topic :: View next topic
|
Author |
Message |
gopugn
New User
Joined: 03 Mar 2008 Posts: 5 Location: pune
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Or search the DFSORT forum, because this has been asked before. |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
Back to top |
|
|
picus_mf Warnings : 1 New User
Joined: 09 Jun 2006 Posts: 52
|
|
|
|
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 |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
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 |
|
|
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
jaspal
New User
Joined: 22 May 2007 Posts: 68 Location: mumbai
|
|
|
|
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 |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
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 |
|
|
|