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 in COBOL

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

New User


Joined: 23 Apr 2009
Posts: 20
Location: India

PostPosted: Thu Nov 03, 2011 2:38 pm    Post subject: Dynamic file allocation in COBOL
Reply with quote

My requirement is to create as many number of files as the number of records from an input file. This should be done dynamically in a COBOL program meaning I don't khow many records will come in on a day and hence could not put that many FD sections in my COBOL program. Can someone help?

PS: This is for a code-generator program.

Thanks.
Parvatha
Back to top
View user's profile Send private message

xknight

Active User


Joined: 22 Jan 2008
Posts: 117
Location: Liberty city

PostPosted: Thu Nov 03, 2011 2:45 pm    Post subject:
Reply with quote

Quote:
Hi,

My requirement is to create as many no of files as the number of records from an input file using. This should be done dynamically in a COBOL program meaning I dono how many records will come on a day and hence could not put that many FD sections in my COBOL program. Can someone help?

PS: This is for a code-generator program.


Hello Parvatha, Isn't this irrelevant post to the thread/topic. icon_eek.gif
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 4:05 pm    Post subject: Re: Dynamic file allocation in COBOL
Reply with quote

apvardhini wrote:
Hi,

My requirement is to create as many no of files as the number of records from an input file using. This should be done dynamically in a COBOL program meaning I dono how many records will come on a day and hence could not put that many FD sections in my COBOL program. Can someone help?

PS: This is for a code-generator program.

Thanks.
Parvatha

My, my, my.

This is actually quite trivially doable. However, have you thought about what's going to happen on the day that someone/something upstream bakes the dog and sends you a control data set with a lakh of records in it...and the storage management team comes after you with hot tar, feathers, and a fence rail?
Back to top
View user's profile Send private message
superk

Moderator Team Head


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

PostPosted: Thu Nov 03, 2011 4:18 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

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

New User


Joined: 23 Apr 2009
Posts: 20
Location: India

PostPosted: Thu Nov 03, 2011 6:20 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

Thanks to all.... I will get back to you after checking those links.... And sorry to have posted in an unrelated topic..
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: Thu Nov 03, 2011 8:25 pm    Post subject:
Reply with quote

Hello,

Why does someone believe all of these files even need to be created?

If you explain how they will be used, someone may have an alternative suggestion. This is most likely NOT a requirement, but merely a way someone has chosen to meet a requirement.
Back to top
View user's profile Send private message
apvardhini

New User


Joined: 23 Apr 2009
Posts: 20
Location: India

PostPosted: Thu Nov 03, 2011 9:39 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

Its a code generator program for archiving tables. The input records will be table names given depending on need....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Nov 03, 2011 9:51 pm    Post subject:
Reply with quote

why don't you use the input file to generate control cards for a utility that would accomplish the 'unload' of the tables for archiving in a much better manner, as well as easier.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 03, 2011 10:00 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

the issue has been debated so many times that it has become pretty boring,
almost deserves to be listed in the 'topics not eligible for discussion'

did You check the links provided ?

PS.
we are at loss here,
noo way the TS will ever care for best practices approach
they just want somebody else solve the problems that they cannot solve themselves
and f*** the best practices
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 10:19 pm    Post subject: Re: Reply to: Dynamic file allocation in COBOL
Reply with quote

enrico-sorichetti wrote:
we are at loss here,
noo way the TS will ever care for best practices approach
they just want somebody else solve the problems that they cannot solve themselves
and f*** the best practices

My team lead baked the dog this morning; he ran a job that submitted others. Unfortunately, he hadn't tested it adequately and it submitted 30,000 jobs on our development sysplex. The performance management workgroup was not happy. We'll see if apvardhini's bosses are as indulgent and allow him to remain employed after screwing up in an equally spectacular fashion.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 03, 2011 10:22 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

follow on
i had a finger check and the most important adjectives were lost in the traffic

Quote:
they just want somebody else solve the problems that they cannot solve themselves


should have been
Quote:
they just want somebody else solve the low level technical problems that they cannot solve themselves
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: Thu Nov 03, 2011 10:27 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

Hi Enrico,

Long ago i pretty much gave up on "best practices".

Many places don't even strive for good practices - just what can be done "right now". . .

There are now many supervisors/project leads that have no clue about "good ways to do things" - and many of these have 5 or 10 years "experience" .

d
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10203
Location: italy

PostPosted: Thu Nov 03, 2011 10:28 pm    Post subject: Reply to: Dynamic file allocation in COBOL
Reply with quote

well..
I am hard headed, and I am not going to give up icon_wink.gif


i think that most of these people belong to the smart*ss category ...

I do not have the time to do the things in the right way, but I have it to do them twice
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Fri Nov 04, 2011 8:01 pm    Post subject:
Reply with quote

Maybe their "Best Practice" is to get others to do the work for them? icon_lol.gif
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 Nov 17, 2011 1:44 pm    Post subject:
Reply with quote

apvardhini

Rather than be critical of the attitude of people who prefer to do things correctly, be thankful that they find the time and spirit to help YOU and thank them rather than to critisise them.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7241

PostPosted: Thu Nov 17, 2011 2:11 pm    Post subject:
Reply with quote

apvardhini wrote:
Big heads... watch your words... just because you help us technically does not mean you can use all your 4 letter words on us.....


First, learn to count. Second, learn difference between "all" and small integers. Third, re-read this thread with those new skills in mind.
Back to top
View user's profile Send private message
don.leahy

Active Member


Joined: 06 Jul 2010
Posts: 641
Location: Whitby, ON, Canada

PostPosted: Thu Nov 17, 2011 6:27 pm    Post subject:
Reply with quote

I confess that I used a 4 letter word in my response: "work"
Back to top
View user's profile Send private message
Ed Goodman

Active Member


Joined: 08 Jun 2011
Posts: 556
Location: USA

PostPosted: Thu Nov 17, 2011 9:03 pm    Post subject:
Reply with quote

Best practice means getting paid at the end of the day. Then you move on to the next customer that your sales team talked into signing a contract. That is a VALID business model.

Think of fountain pens. You used to buy one and keep it for years/decades. It was made to last. If there was something wrong with it, you could actually take it to a craftsman and they would repair it.

Now days, you buy cheap disposable pens for about $2 a dozen. They work for a few weeks and you toss them out. That's what people want these days. If they find another brand for $1.50, they'll buy it. They don't care about the difference in quality.

So if you make disposable pens, would you spend the time to make it "right" or would you just get them made?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Fri Nov 18, 2011 1:47 am    Post subject:
Reply with quote

I don't think anyone used a 4 letter word on you - OK perhaps 'work'
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 153
Location: USA

PostPosted: Fri Dec 09, 2011 10:37 am    Post subject:
Reply with quote

My advice is that if you plan to create datasets dynamically, you follow your shops rules on this.
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 Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm


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