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



Hi Vern,

"Free format file descriptions have to be externally described." doesn't match the manual.  I haven't done it, but you should be able to define a program-described file in free format with something like

dcl-f myFile disk(200);

The caveat is you would have to do I/O with a data structure, e.g.

chain (search-arg) myFile myDataStruc;

--
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
petercdow@xxxxxxxxx
pdow@xxxxxxxxxxxxxx '/

On 6/21/2023 4:40 AM, Vern Hamberg via RPG400-L wrote:
Hi Dave

Should I assume that your physical file is internally described? Therefore, you are using fixed format? Free format file descriptions have to be externally described.

Anyhow, with internal descriptions, we have I-specs with record identifiers - this is old school, I've not used this for decades, I think!   :)  And then there would be indicators, IIRC. Nowadays you can give names to some indicators, maybe, for this purpose.

I did look at the SFILE keyword documentation - https://www.ibm.com/docs/en/i/7.3?topic=keywords-sfilerecformatrrnfield#fsfile - you can see whether there is any way to use variables.

Regards
Vern

On 6/20/2023 9:42 AM, Dave wrote:
Thanks, that's how we always did it!!

I was wondering if I would end up having to do something like
when sfl010,
when sfl020,

for all my read, writes and exfmt or is there anything in the file
definition specifications that would let me have the format name in a
variable.



    - *Subject*: RE: Managing one physical file with several subfile record
    formats
    - *From*: "Sean Courtney" <scourtney@xxxxxxxxxxx>
    - *Date*: Tue, 20 Jun 2023 09:33:21 +0200

------------------------------
Hello,

You just need to add SFILE for each subfile :

workstn infsr(*pssr)
sfile(sfl010:sn10##)
sfile(sfl020:sn20##)

Kind regards

Seán






On Tue, 20 Jun 2023 at 09:20, Dave <dfx1@xxxxxxxxxxxxxx> wrote:

Hello,

I don't think it's possible to do this but I'm very much outdated and
maybe there's something that can help :

FMYFILE  CF   E             WORKSTN
F                                     SFILE(MySFRecord:SFRRN)

MYFILE is the name of the display file, but MySFRecord would be variable.

I have a simple program that reads records from a flat physical file into
a subfile, manages these and updates the physical file from them.

Now I need to add different subfile record formats and do the same, still
managing the same physical file.


Thanks



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.