× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



I haven't tried it, but would it be possible to create an SQL View that you
then can access with SQL for each Format?

Mit freundlichen Grüßen / Best regards

Birgitta Hauser


"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
?Train people well enough so they can leave, treat them well enough so they
don't want to.? (Richard Branson)


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
smith5646midrange@xxxxxxxxx
Sent: Mittwoch, 30. Dezember 2020 04:29
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: RE: Multiple formats in PF or LF

"I don't understand why anyone would consider a single "flat file' with
multiple record formats for a header/detail/payment type of file."
Answer: It is a flat file provided by a third party vendor. If I had any
say in the matter, it wouldn't be this way but I don't and it is and we get
to live with it.

I'll give up and do it the hard way with multiple physicals and multiple
CPYFs selecting the record type for each physical and then process it like
any other data set. The thought was to not have to split the data from one
file to multiple files and I thought I had seen this done but apparently I'm
wrong and the ability doesn't exist. Maybe my brain is going back to my old
COBOL days and the REDEFINES on the 01 level.

Thanks anyhow.



-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Dan
Sent: Tuesday, December 29, 2020 7:35 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: Re: Multiple formats in PF or LF

I'm working with a head cold right now, so not sure if this is what you're
looking for.

I didn't quite make the connection in my last email, so allow me to clarify.

I don't understand why anyone would consider a single "flat file' with
multiple record formats for a header/detail/payment type of file. The
System/36 died a long time ago. Alan's suggestion to try SUBSTR gives me
shudders, like, shoot me now kind of shudders. Do you hate the people who
will inherit your code? ;-)

Have you considered creating three DDS PFs / SQL tables: Header, Detail,
Payment

Having defined those, you can create a multiple-format LF using DDS. But,
per my last email, I don't know whether SQL would play nice with that.

It sounds to me like your solution might be to JOIN the PFs / tables in a
CREATE VIEW, and eschew the multi-format LF altogether. You might be able
to use lateral correlation in place of joining the files in the view.

- Dan

On Tue, Dec 29, 2020 at 6:52 PM Dan <dan27649@xxxxxxxxx> wrote:

A PF can have only one record format, but an LF can have multiple
record formats.

Because it's been ages since I last used them, I can only point you to
IBM's DDS for Physical and Logical files Reference. Search for
"multiple-format logical files in DDS" to find a code sample.

I'm not sure whether SQL can process a multiple format LF. Hopefully,
others can assist.

- Dan

On Tue, Dec 29, 2020 at 6:37 PM <smith5646midrange@xxxxxxxxx> wrote:

I'm starting to think that I am searching for something that doesn't
exist.

I thought there was a way of having a single "flat file" and breaking
it into multiple record formats in the DDS so the individual records
could be accessed via SQL

For example: a flat file that would contain sales data

HdrFmt
RcdType
SaleNumber
SaleDate
DtlFmt
RcdType
SaleNumber
Item
Quantity
Price
PayFmt
RcdType
SaleNumber
PaymentType
Amount

If I wanted to query all of the detail records to find out what items
were sold, I could do something like select item, count(*) from
flatfile where rcdtype = 'DTL' group by item

Am I just thoroughly confused thinking I have seen something like
this in the past? If not, can someone please provide the DDS to show
me how it is done? Nothing that I have tried has worked. I know I
can create separate PFs and copy the appropriate data to each file
via a CPYF *NOCHK selecting the appropriate rcdtype but that defeats
the purpose of what I am trying to do.


--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate link:
https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.