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

Dynamic file allocation in COBOL


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 4:05 pm
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

Global Moderator


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

PostPosted: Thu Nov 03, 2011 4:18 pm
Reply with quote

www.ibmmainframes.com/viewtopic.php?t=36069
www.ibmmainframes.com/viewtopic.php?t=35005
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
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

Moderator Emeritus


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

PostPosted: Thu Nov 03, 2011 8:25 pm
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
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 03, 2011 10:00 pm
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: 1788
Location: Bloomington, IL

PostPosted: Thu Nov 03, 2011 10:19 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 03, 2011 10:22 pm
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

Moderator Emeritus


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

PostPosted: Thu Nov 03, 2011 10:27 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Nov 03, 2011 10:28 pm
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: 765
Location: Whitby, ON, Canada

PostPosted: Fri Nov 04, 2011 8:01 pm
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: 8797
Location: Welsh Wales

PostPosted: Thu Nov 17, 2011 1:44 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Nov 17, 2011 2:11 pm
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: 765
Location: Whitby, ON, Canada

PostPosted: Thu Nov 17, 2011 6:27 pm
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
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: 2455
Location: Hampshire, UK

PostPosted: Fri Nov 18, 2011 1:47 am
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
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Fri Dec 09, 2011 10:37 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Replace each space in cobol string wi... COBOL Programming 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top