×
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.
On 2018-02-14 7:06 PM, Jon Paris wrote:
You got that backwards Buck - having it in a DS will _honour_ the database definition. If it is not in a DS it will convert to packed.
Just to clarify this ...
If the subfield is in an externally-described DS, it will honour the
database definition. But if you just name it in a program-described DS,
it will use RPG's default rules and make it zoned.
A R REC
A P5_2A 5P 2
A P5_2B 5P 2
A S5_2A 5S 2
A S5_2B 5S 2
dcl-f junkf;
dcl-ds *n;
p5_2a;
s5_2a;
end-ds;
dcl-ds ds2 extname('JUNKF') qualified end-ds;
From the cross reference:
DS2 DS(16)
P5_2A P(5,2)
P5_2B P(5,2)
S5_2A S(5,2)
S5_2B S(5,2)
P5_2A S(5,2)
P5_2B P(5,2)
S5_2A S(5,2)
S5_2B P(5,2)
P5_2A and S5_2A are zoned, because they were in the program-described
data structure with just their names.
P5_2B and S5_2B are packed, because they didn't appear anywhere in D specs.
The DS2 subfields are the same as the file.
As an Amazon Associate we earn from qualifying purchases.
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.