|
In the original template, the call was:there
c CALL 'PSVSH01R'
c parm .....
c parm .....
c etc.
In the new template, it's:
DsplSearch(...: ...: etc...);
Where:
d DsplSearch PR ExtPgm('PSVSH01RA')
d ... like(....... )
d ... like(....... )
d etc.
If that is not calling a program with a procedure than I apologize for
my misuse of the terminology.
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Friday, July 05, 2013 11:51 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Multiple occurrence data structure anomaly
In your original message you said that the program was calling a
procedure.
You cannot call a program with a procedure so that said to me that you
were
creating some kind of service program.
When you say ILE, do you mean you just converted to RPG IV? There
shouldn't
be any difference in how it works if you just converted to RPG IV. You
seem
to indicate in your message that everything is the same, just calling
the
RPG IV program?
On Fri, Jul 5, 2013 at 9:44 AM, Briggs, Trevor (TBriggs2) <
TBriggs2@xxxxxxxxxxx> wrote:
The called program is an old program that I don't want to mess with,and
expects (and populates) a MODS - not the way I would do it, but
weuse
are.It
The calling program is actually a file maintenance program template.
used to be OPM and appeared to work just fine. The template has been
upgraded to ILE and I was "lucky" enough to be the first person to
this?it to create a new maintenance pgm. While testing the function thatchange
calls the second program I encountered what appears to be a rule
between OPM and ILE functionality.
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Alan Campin
Sent: Friday, July 05, 2013 11:36 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Multiple occurrence data structure anomaly
I would agree with Jon. The question I have is why are you doing
occurrenceit
sounds like you are trying to apply a monolith solution to a an ILE
world
but I might be misunderstanding what you are trying to do.
On Fri, Jul 5, 2013 at 7:54 AM, Briggs, Trevor (TBriggs2) <
TBriggs2@xxxxxxxxxxx> wrote:
Barbara,current
You say:
" When you pass a MODS as a prototyped parameter, it passes the
occurrence. (As you've seen.)"
What I interpret you are saying is that ONLY the current
is1
passed. Yet in practice, I see that if Pgm B populates occurrences
occurrenceand
2, then Pgm A sees this on return. What is apparently happening isthat
the whole MODS is being passed (at least, is being returned), but
"positioned at" the current occurrence.
What I find really odd is that without the setting of the
keywordto(This
1 before the call, when Pgm B populates occurrences 1 and 2, Pgm Asees
the results in occurrences 50 and 51 - of a 50-occurrence MODS!
iscurrent
observed by investigating the MODS with Debug - i.e. eval
MYMODS(50..51). Attempting to access occurrence 51 in the program
generates error RNX0122: OCCUR value is out of range, as one would
expect.)
Curious!
Trevor Briggs
Analyst/Programmer
Lincare, Inc.
(727) 431-1246
TBriggs2@xxxxxxxxxxx
-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Barbara Morris
Sent: Wednesday, July 03, 2013 9:42 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Multiple occurrence data structure anomaly
On 7/2/2013 2:46 PM, Briggs, Trevor (TBriggs2) wrote:
...
When control is returned to Pgm A, value is in
occurrence 50 of the MODS.
When you pass a MODS as a prototyped parameter, it passes the
thinkoccurrence. (As you've seen.)
I assume you didn't add the DIM keyword for the prototyped, so I
it makes sense that it would pass the current occurrence.
Just by the way, if you use an array of data structures (DIM
it'sinstead of OCCURS keyword), you can distinguish between the wholearray
ARR, and an element ARR(i).
For sure I would recommend using a DS array for new code, since
andsubfields.easier (I think) to code array indexes than to manage occurrences.
But for existing code, it's not usually easy to change a MODS to a
DS-array, since it involves changing every reference to the
For example, if a MODS named INFO was previously not qualified,
ADDRINFO
was changed to a qualified ds array, the reference to subfield
************************************************************************would change from simply ADDR to INFO(index).ADDR.(RPG400-L)
--
Barbara
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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.
************************************************************************
the************************************************************
This message originates from Lincare Holdings Inc. It containsinformation
which may be confidential or privileged and is intended only for
areuseindividual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or
the
contents of this message.
All personal messages express views solely of the sender, which
immediatelynot to
be attributed to Lincare Holdings Inc., and may not be copied or
distributed without this disclaimer.
If you received this message in error, please notify us
at************************************************************************
MailAdmin@xxxxxxxxxxx or (800) 284-2006.
************************************************************************
************************************************************************************************************************************(RPG400-L)
(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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 (AS/400 and iSeries)
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.
************************************************************************
************************************************************use
This message originates from Lincare Holdings Inc. It containsinformation
which may be confidential or privileged and is intended only for the
individual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or
theat
contents of this message.not to
All personal messages express views solely of the sender, which are
be attributed to Lincare Holdings Inc., and may not be copied or
distributed without this disclaimer.
If you received this message in error, please notify us immediately
************************************************************************MailAdmin@xxxxxxxxxxx or (800) 284-2006.
************************************************************************
************************************************************(RPG400-L)
(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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 (AS/400 and iSeries)
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 message originates from Lincare Holdings Inc. It containsinformation
which may be confidential or privileged and is intended only for thethe
individual or entity named above.
It is prohibited for anyone else to disclose, copy, distribute or use
contents of this message.not to
All personal messages express views solely of the sender, which are
be attributed to Lincare Holdings Inc., and may not be copied or************************************************************************
distributed without this disclaimer.
If you received this message in error, please notify us immediately at
MailAdmin@xxxxxxxxxxx or (800) 284-2006.
(RPG400-L)
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
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 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.