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



I would put the DS template in a copy member and include it via /copy in the prototype copy member and also include it via /copy in the program which uses the procedure. Be aware that you should use compiler directives to not include the copy member with the DS twice.

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Monday, September 14, 2009 12:26 PM
To: RPG programming on the IBM i / System i
Subject: RE: Physical file used for declaring a data structure

Hi Birgitta, Mihael,

These data structures are being passed as parameters.The prototype ds would need to be defined on the externally defined ds.

Would you therefore always need two /copy? One for the prototype and one for the DS?


-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Birgitta Hauser
Envoyé : lundi 14 septembre 2009 11:49
À : 'RPG programming on the IBM i / System i'
Objet : AW: Physical file used for declaring a data structure

Hi,

in either way I'd put the external data structures into a
copy member and define them as based and embed them into the program.
In this way no storage will be reserved when activating the
program and the fields can only be used to define other fields.

D MyDS E DS EXTNAME(MyFile) Based(DummyPtr)

When using data structures instead of field definitions,
zoned fields get defined as zoned fields (and not as packed fields).
In former times it was much easier to define and change an
external data structure than an internal described data structure.
In either way I'd prefer to have an external data structure
than defining the fields directly.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the
stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek
Bok) "What is worse than training your staff and losing them?
Not training them and keeping them!"

-----Ursprüngliche Nachricht-----
Von: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] Im Auftrag von David FOXWELL
Gesendet: Monday, 14. September 2009 11:12
An: RPG programming on the IBM i / System i
Betreff: Physical file used for declaring a data structure

Hi,

We have a few DDS PF that are used uniquely to describe a
data structure in a program.

eg, D MyDS E DS EXTNAME(MyFile)

These files are destined never to contain any data and are
even placed in libraries separate from libraries containing
files with data. They are just there so that the RPG source
will compile.

My question is, what's the point of this? Why not just write
D specs in a copy book like one would a prototype?

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


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