× 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.



All data files are, by definition, externally defined on the System i. When
data files are migrated from the System/36 to the System i, the system has
no "memory" of what fields exist where. The only thing it knows is the
length of each record and, if applicable the location of the key(s). Ergo,
it creates fields for these elements.

To truly use a "flat file" one must either program describe it, use
something like IDDU (a 36 holdover), substring the F0000x field(s), etc.

The proper way is to create DDS or DDL (SQL) to define the file and then
copy the data from the flat file into the new file. When I started here and
at my previous employer, their primary application was (is) 36E. My
previous boss was under the (mistaken) impression that, if the file was
externally described, it could not be used by the RPG II programs; some high
paid consultant blew that smoke up his ass. When I left the previous
employer, 95+% of the files were externally described. Here about 50% are
now externally described.

Working with our point-of-sales software vendor recently, we were able to
send replenishment orders direct to an externally described file on the
System i, which is then passed to our old (dare I say, legacy) 36E programs.


That said, the hardest part occurs when one encounters multi-format files;
i.e., an order file that has headers and item details in the same file.
That gets harder to externalize, but still doable (and beyond the scope of
this thread, methinks).

Jerry C. Adams
IBM i Programmer/Analyst
Before you diagnose yourself with depression or low self-esteem, First, make
sure you are not, in fact, surrounded by assholes.
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Steven Spencer
Sent: Friday, March 16, 2012 1:33 PM
To: RPG programming on the IBM i / System i
Subject: accessing QS3F data by utilities and 4GLs - where do they see the
field layout ?

HI Folks,

Jerry C. Adams,
Just a note about QS36F data. QS36F is no different from any other
library.The ease of accessing the data depends solely upon whether or
not it is externally defined (SQL-compatible). ....There's nothing
really "strange" about QS36F.

Steven
There is nothing different about the data, per se. It is simple sequential
or ISAM data, without any referential integrity, relations, editing, field
name, etc. built in on a global level.
There is a major difference when programs access the data, compared to
accessing DB2 data

When a smart utility accessed DB2 data, they are accessing the DDS source
(or compiled info returned from the OS), so they have the field layouts.

When QS36F library data is accessed, if it is sequential the operating
system has it defined as one big field, F00001. (As the result of the
initial BLDFILE or FILE, DISP-NEW commands.) The OS will add the key fields,
so perhaps you can have a total of seven fields defined, something like :

F00001, K00001. F00002. K00002, F00003 K00003, F00004.

(I am guessing that this is how a multi-key-part field looks,
extrapolating from the single key case which I have seen). However,
the RPG programs have internally defined this as maybe 50 or 100 fields.
Similarly any F & I spec, IDDU or DDS you have written to look at the file
can show all the fields.

So the utility must be explicitly told not to use the OS data, but to use
either :

1) DDS, IDDU, or F&I

2) data dictionary, e.g. one that is in the utility program

How this is done by various utilities varies. Even native iSeries utilities
like Linoma's Surveyor, Lansa's 4GL and NGS query can use different methods,
but generally they will have a method, solid and not too difficult, at most
some hand-work into their data dictionary.
However, generic SQL lineage systems like Squirrel may or may not have an
easy way to handle this, each case much be examined individually.

Presumably the EGL has a method,

Steven Spencer
Queens, NY


--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or
change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at
http://archive.midrange.com/rpg400-l.


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.