×
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.
Sorry but I don't think this addresses the issue of being able to change
only some subfields in the called procedure.
But then again it's Friday afternoon....
On 2012-06-15 3:45 PM, Denny Ray wrote:
define the DS in a copy member
d ThisDs Ds Qualified Template
d Plant 4
d WeekEnd D
d From 10
d Print N
I'd, personally, stick the PR in there too...
d DoCalc Pr ExtProc( 'PRDZZFSR' )
d InThis LikeDs( ThisDs )
the procedure
d DoCalc Pi
d This LikeDs( ThisDs )
On 6/15/2012 12:31 PM, Robert Rogerson wrote:
Hi All,
I'm just hoping that someone can spare a moment and help me understand
this better.
I'm unclear how or if I can stipulate a parameter as const when passing a
datastructure defined like a template. For example, see the following
code.
h option(*nodebugio:*srcstmt)
d testpgm7 pr
d t_DayDs ds template
d subfield1 10a varying
d Overlay(t_DayDs)
d subfield2 like(subfield1)
d Overlay(t_DayDs: *next)
d subfield3 like(subfield1)
d Overlay(t_DayDs: *next)
d subfield4 like(subfield1)
d Overlay(t_DayDs: *next)
d subfield5 like(subfield1)
d Overlay(t_DayDs: *next)
d subfield6 like(subfield1)
d Overlay(t_DayDs: *next)
d subfield7 like(subfield1)
d Overlay(t_DayDs: *next)
d testpgm7 pi
d DayDs ds likeds(t_DayDs)
/free
*inlr = *on ;
DayDs.subfield1 = 'Sunday';
GetDaysOfWeek(DayDs);
Return;
/end-free
p GetDaysOfWeek b
d GetDaysOfWeek pi
d i_DayDs likeds(t_DayDs)
/free
*inlr = *on ;
If i_DayDs.subfield1 = 'Sunday';
i_DayDs.subfield2 = 'Monday';
Endif;
Return;
/end-free
p GetDaysOfWeek e
The datastructure DayDs is defined like the template t_DayDs. I don't
want the procedure GetDaysOfWeek to be able to change subfield1. If I had
passed all 7 parameters I would have specified the keyword const for the
first parameter.
How or can I do with a keyword when I pass a datastructure.
Thanks to all in advance.
Robert Rogerson
As an Amazon Associate we earn from qualifying purchases.
This thread ...
RE: Explanation of a datastructure as a parameter..., (continued)
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.