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


  • Subject: Re: Can a PF have >1 record format?
  • From: MacWheel99@xxxxxxx
  • Date: Tue, 9 Jan 2001 17:42:39 EST

>  From:    D.BALE@handleman.com
>  
>  I asked this last week and got one response (thanks, Peter!) but would
>  appreciate a little more discourse on the topic.  The help for CPYF seems 
to
>  imply that a PHYSICAL file can have multiple record formats.  Am I missing
>  something?  I am already familiar with logical files having mulitple record
>  formats.
>  
>  Can someone educate me how the RCDFMT parameter on the 
> CPYF command is used on
>  a physical file?  Is this something that would be used for a non-described,
>  multi-format file (i.e., S/36-style Header & Detail formats combined into 
> one file)?
>  
>  The help on my v3r2 says (and v4r4 softcopy is similar):
>  
>               Record format of logical file (RCDFMT) - Help
>  
>  Specifies, for copying from a database file only, the name of the record
>  format that is copied.  If the from-file is not a logical or physical file,
>  *ONLY is the only value allowed.  A record format name is optional if the
>  logical file has only a single record format, but either a format name or
>  *ALL must be specified if the from-file has more than one record format.
>  
>  The possible values are:
>  
>  *ONLY
>      The only record format in the from-file is copied.  When
>      the from-file is a logical file, this value is allowed
>      only if the file has a single record format.
>  
>  *ALL
>      All record formats in the logical from-file are used.
>  
>  record-format-name
>      Specify the name of the record format that is copied
>      when the from-file is a logical or physical file.
>  
>  
>  Dan Bale
>  IT - AS/400
>  Handleman Company
>  248-362-4400  Ext. 4952

I may or may not be able to help here.

Yes a PF can have >1 record format.
I know because we have a few files that way, but not very many.
Most of them are legacy from S/36 not re-engineered on AS/400,
but we also have a few that BPCS did that way.

We have some programs that used to be S/36 internally described but got 
converted to run on OS/400 & we used DDS to externally describe the files & 
the logic runs pretty much the same as before, except better logical & using 
some RPG/400 constructs that were not available on RPG/36.

Multiple format PFs work.
The RECORD statement in DDS says what the layout is for each format
The method of RPG access to the file basically says CHAIN or READ this format 
or that format.

We also have some old S/36 programs converted to RPG/400 which I never got a 
round TUIT on creating DDS to make the file externally described ... this is 
where the file is a temporary member ... program A populates it, program B 
reads the contents in a string of programs ... and multiple formats are 
supported there also.

However, I also have some SQL embedded in some RPG programs in which the 
fields are accessed in the format FILE.FIELD in which it looks to me like SQL 
does not support multiple formats.

I took a course in some of this at IBM school & my recollection is that 
multiple formats are a violation of relational data base theory.  IBM 
supports both that which is correct for RDB & legacy structures that violate 
RDB.  Now I have not seen any mention that IBM will drop such support in the 
future, but I would not be surprised.

All of our files either came from DDS definition, BPCS files in which SSA GT 
overlooked sending us the source code, some PRTF files in which I copied some 
other PRTF with a new name, I have some "flat" files defined as 132 or 198 
characters wide (targets for CPYSPLF).

Any time I do a CRTPF, I have some DDS organized in advance with what I want 
in that new data file, except if I am creating a source file.

Jim Langston's post implies that I cannot be doing what I am doing, so after 
I go into the office (I am taking a vacation day today) I may be inspired to 
look up programs I recall that I thought had this in them.

MacWheel99@aol.com (Alister Wm Macintyre) (Al Mac)
AS/400 Data Manager & Programmer for BPCS 405 CD Rel-02 mixed mode (twinax 
interactive & batch) @ http://www.cen-elec.com Central Industries of 
Indiana--->Quality manufacturer of wire harnesses and electrical 
sub-assemblies - fax # 812-424-6838

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.