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



Here is the problem: We have a cobol OPM program that needs more than 30
parameters, since cobol can't handle that we've compressed the parms into a
couple of data structures. We now want to call this program as a SQL stored
procedure. Since the "real" parameters to the program are a could of big
data structures with a mix of packed numeric and char fields we'd like to
have a wrapper program that accepts the parms as individual fields packs
them into the DS and calls the cobol program. RPGLE goes up to 255 parms so
that seems like a great idea.

Ideally, I'd like to do the following (the real code has >40 parms):

DP1PARM           ds
D P1BCST                         1
D p1bbnb                         5p 0
D p1bdst                         1
C     *entry        plist
C                   parm                    p1bcst
C                   parm                    p1bbnb
C                   parm                    p1bdst
C                   call      'cblpgm'
C                   parm                    p1parm


But I don't seem to be able to pass subfields as parms. So:

1) Is there a way I can pass subfields?
-or-
2) If I define a series of standalone fields like:

D W1BCST          s              1
D W1bbnb          s              5p 0
D W1bdst          s              1

Are they GUARANTEED to be contiguous in memory? If so I could pass these
parms into the RPGLE program and then do a memcpy of the first parm for the
total number of bytes in all parms into the datastructure to move all the
parms in one shot.

Now, I know all I really need to do is an "eval p1bcst = w1bcst" for each
parm before the call and a "eval w1bcst = p1bcst" for each parm after the
call, but when you have >40 parms and numerous programs with this problem
you look for shortcuts.

-Walden

------------
Walden H Leverich III
President
Tech Software
(516)627-3800 x11
WaldenL@TechSoftInc.com
http://www.TechSoftInc.com



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.