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
 

 

Which one is Better Array Processing or File Processing

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Thu Aug 19, 2010 3:48 pm    Post subject: Which one is Better Array Processing or File Processing
Reply with quote

Hi,

I would like to know which one is better for processing interms of time, internal array(READ/WRITE) and processing of VSAM KSDS File(READ/WRITE) for about 300K Records?

Thanks,
satmaar
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 19, 2010 3:58 pm    Post subject: Reply to: Which one is Better Array Processing or File Proce
Reply with quote

I'm unsure as to how you'd load the array internally into your program. This needs to be explained a little better.

How many of the 300K records will be WRITES?

Too many random WRITES can be costly and inefficient, but what that "too many" is requires background information and research on your part.

If you estimate that this file may grow in the future and the number of WRITES becomes significant, then you may reach a point where it might be a better choice to write all the records to a temporary flat-file and then SORT by key.

Also, ensure that you're using adequate buffers for this file. The AMORG JCL parameter is the place to check.

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 19, 2010 3:59 pm    Post subject:
Reply with quote

satmaar wrote:
internal array(READ/WRITE)


what do you mean with todays' made-up word?
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Thu Aug 19, 2010 5:08 pm    Post subject:
Reply with quote

Bill,Thanks for your Reply.
Let me explain, We are Declaring array in a program and it is being used for Writing from other input file and later this array is used for input to create other file in the same program.

So what i wanted to know is instead of creating this array in program,if we could already have this info copied into any files will it give lesser processing time or it ll give same time as array process.

Hope you understood.please let me know if i could elaborate little more.

Thanks,
Satmaar
Back to top
View user's profile Send private message
satmaar
Currently Banned

New User


Joined: 11 Feb 2009
Posts: 16
Location: Bangalore

PostPosted: Thu Aug 19, 2010 5:10 pm    Post subject:
Reply with quote

dbzTHEdinosauer wrote:
satmaar wrote:
internal array(READ/WRITE)

Actually i wanted to say this array was declared inside the program.Sorry for the confussion
what do you mean with todays' made-up word?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Thu Aug 19, 2010 5:33 pm    Post subject:
Reply with quote

COBOL does not have internal arrays.
there are host variable arrays for db2.
the term in cobol is COBOL INTERNAL Table.

array is a term used for JAVA, C, etc....

and your requirement definition lacks specifics.

what actually are you doing. saying I want to write and read is not professional.
to receive any useful help from us you need to describe what your requirement is.
as Bill said, size is very important.
also, what processing of the records is required? reformat?

all we know is that you want to do something with a vsam file
and you have mentioned a figure of 300k records.
are these part of the vsam file, are they another file?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 19, 2010 7:28 pm    Post subject: Reply to: Which one is Better Array Processing or File Proce
Reply with quote

The COBOL internal table option should be eliminated as an option.

If the internal table were defined to hold 300K+ records and each record is (conservatively speaking) 100-bytes long, that's 30M+ bytes of memory alone, just for a single table.

This would rival the size of nearly all load modules....

Bill
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Thu Aug 19, 2010 9:08 pm    Post subject: Re: Reply to: Which one is Better Array Processing or File P
Reply with quote

Bill O'Boyle wrote:
The COBOL internal table option should be eliminated as an option.

If the internal table were defined to hold 300K+ records and each record is (conservatively speaking) 100-bytes long, that's 30M+ bytes of memory alone, just for a single table.

This would rival the size of nearly all load modules....

Bill


And its not possible that storage in COBOL is allocated dynamically?
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 Aug 19, 2010 9:15 pm    Post subject:
Reply with quote

Hello,

Quote:
I would like to know which one is better for processing interms of time, internal array(READ/WRITE) and processing of VSAM KSDS File(READ/WRITE) for about 300K Records?
Rather than giving us 2 "solutions" to rate or choose between, you would get more usable info if you described the requirement you need to accomplish.

Once people know what the actual business process needs to support, better suggestions can be made.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Aug 19, 2010 10:18 pm    Post subject: Re: Reply to: Which one is Better Array Processing or File P
Reply with quote

Peter Holland said -
Quote:

And its not possible that storage in COBOL is allocated dynamically?

It is certainly possible, by obtaining external storage via CEEGTST, an MVS GETMAIN or a STORAGE OBTAIN, but 30M+ is a sizable amount and this was just a guess, because the LRECL was not furnished.

Plus, I don't know what version/release of COBOL the OP is running?

In COBOL2, the largest size for an 01 level is 16MB-1. But of course, later version/releases allow a greater size.

However (as we're frequent lurkers of this site), many times these shops are still running COBOL2 or (even worse), OS/VS COBOL, which has a 128K 01 level maximum size.

If/when the table grows exponentially, to where 100MB+ is required, wouldn't that be the time to sit back and question whether this was a good idea to begin with as well as seek out and pummel the designers and reward the non-participants? (Managerial ethics, ya know).

Just my 2ยข.... icon_wink.gif

Bill
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2422
Location: Netherlands, Amstelveen

PostPosted: Fri Aug 20, 2010 1:47 am    Post subject:
Reply with quote

Bill,

i was wondering about this :

Quote:

This would rival the size of nearly all load modules....


Beside that, for array processing like the TS suggested, means reading the data in memory, building array/table processing (Dick Brenholtz will be puking now because of my terms).
I think its easier to process VSAM KSDS data if we are talking about huge
quantities of records.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Fri Aug 20, 2010 2:46 am    Post subject: Reply to: Which one is Better Array Processing or File Proce
Reply with quote

Peter,

Actually, what I was trying to say was, if the table were part of COBOL WS, the load module would be huge and its size would probably be larger than any other load module in the shop.

I can't think of a reason to have such a large load module and suggested acquiring external storage.

But yes, I can hear Dick puking as I type this. icon_eek.gif

I guess this is why he changed his location to the Porcelain Throne? icon_wink.gif

Bill
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Aug 20, 2010 7:55 am    Post subject:
Reply with quote

My, my, my - is the heretofore even-steven Bill O'Boyle developing a sarcastic bent to his posts? icon_lol.gif

and my new location has more to do with the origin of my posts,
rather than my reaction to others'.

and just for the record:
dynamic allocations are perfect when you are not sure of your potential requirement,
but if you know that you are going to use a 100,000 item table,
allocate for it at compile time. That way the scheduling of the Job containing the step requiring large resources can be planned for and accomodated to insure that there are always adequate resources.

I love dynamic expansion of working-storage:
  • provides a venue for outside the box coding
  • separates the kids from the adults
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Fri Aug 20, 2010 8:13 am    Post subject:
Reply with quote

If access time is a concern, you may be able to allocate a UNIT=VIO device in your JCL. This simulates a disk file but resides in memory so no special GETMAINs. Some shops limit the size of VIO files so as not to over-commit memory.

Heard an analogy that reading from memory is like reaching into the mailbox outside the front door. Reading from disk is like getting in the car and driving to the main post office.
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
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
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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