It would be interesting if someone can supply his answer
However, what I have done is used substr
Depending upon the record type
Ithe can become quite involved depending on what you need to do
But it works
Sent via the Samsung GALAXY S® 5, an AT&T 4G LTE smartphone
-------- Original message --------
From: smith5646midrange@xxxxxxxxx
Date: 12/29/20 18:37 (GMT-05:00)
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Multiple formats in PF or LF
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
As an Amazon Associate we earn from qualifying purchases.