Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: "Rick Smith" <ricksmith@xxxxxxx>
- Date: Sun, 23 Sep 2007 21:07:48 -0400
"Robert" <no@xxxxxx> wrote in message
news:jcudf3p4beb1uhah7a9pvjsm0tadr5svgp@xxxxxxxxxx
On Sun, 23 Sep 2007 18:44:25 -0400, "Rick Smith" <ricksmith@xxxxxxx>wrote:
take
"Robert" <no@xxxxxx> wrote in message
news:g1ndf3l5qfdmf805qfrsqt5v2li1sa62t1@xxxxxxxxxx
On Sun, 23 Sep 2007 18:30:03 GMT, "William M. Klein"<wmklein@xxxxxxxxxxxxxxxxx> wrote:
[snip]
solution forP.S. The qualification by FD-name is the simplest and most obvious
the record inwhat the OP wanted.
I wouldn't do it that way. If merging is required, I'd put OCCURS 5 on
working-storage. Finding the lowest record out of 5,000 would then
qualifiedno more code than
finding the lowest of 5 -- it would be a simple loop. Multiple
records will
produce copy-and-paste bloated code.
The original problem was stated as:
"I'm writing a COBOL program which accepts 5 KSDS
files and extract data into a single file."
Set up five input files, a merge file, and an extract file.
Merge using the five input files with an output procedure.
In the output procedure, determine which records or
data, from the merge file, are to be extracted, then
move the appropriate records or data to the extract file
and write.
No "copy-and-paste bloated code" required. Just
qualification of data names using the merge file and
possibly, depending on the requirements, the extract file.
Good answer. I like it better than mine, *IF* a merge is required.
Unless a merge is, for some strange reason, prohibited,
do it anyway because it is the easiest COBOL solution to
implement without "copy-and-paste".
The next easiest would seem to be using SAME RECORD
AREA for all five input files and maybe the extract file if
complete records are extracted. Five "copy-and-paste"
loops, one for each input file. And a common test-write
routine. SAME RECORD AREA permits the test-write
routine to use the same file-name qualification regardless
of which input file is being processed.
After that, all-COBOL solutions seem to become less
appealing and JCL solutions more appealing.
.
- References:
- Same Record Key and FD for multiple VSAM files (of same structure)
- From: dividby0
- Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: Robert
- Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: William M. Klein
- Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: Robert
- Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: Rick Smith
- Re: Same Record Key and FD for multiple VSAM files (of same structure)
- From: Robert
- Same Record Key and FD for multiple VSAM files (of same structure)
- Prev by Date: Re: [OT] Iraq
- Next by Date: Re: RW - False Generalization (was: COBOL "non-myth" confirmed - Index and subscripts (MF on Windows)
- Previous by thread: Re: Same Record Key and FD for multiple VSAM files (of same structure)
- Next by thread: Same Record Key and FD for multiple VSAM files (of same structure)
- Index(es):
Relevant Pages
|