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



A DS when passed by the DS name is simply a huge char string.





From: "Koester, Michael" <mkoester@xxxxxxxxxxxxx>
To: RPG programming on the IBM i / System i <rpg400-l@xxxxxxxxxxxx>,
Date: 05/24/2012 04:09 PM
Subject: RE: Passing data structure to batch job
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



Tommy,
I don't expect it to get that large. Is it legal to pass the name of the
data-structure as the parm? Didn't know that... (the first phrase of my
original post was "Never tried this before:")

I'll try that right now...
-- Michael

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Tommy.Holden@xxxxxxxxxxxxxxxxxxxxx
Sent: Thursday, May 24, 2012 5:01 PM
To: RPG programming on the IBM i / System i
Subject: RE: Passing data structure to batch job

Will the DS ever be larger than 5000 characters? If not then why not just
create a command that accepts a single parm and use the command on the
SBMJOB?





From: "Denis Robitaille" <denis_robitaille@xxxxxxxxxxxx>
To: "i, RPG programming on the IBM i / System"
<rpg400-l@xxxxxxxxxxxx>,
Date: 05/24/2012 03:55 PM
Subject: RE: Passing data structure to batch job
Sent by: rpg400-l-bounces@xxxxxxxxxxxx



I will give it a try to suggest something easy and that works in all
circumstances:

Use a file for which the record definition is like the data structure
mentioned plus one field that is the key (let's say a 15 digit number
field). The short running program puts the values to pass to the long
running program in a record in that file. Chooses whatever method you
which to generate the key value (stored in a data area, position yourself
on the last record and do a read previous ...). Now the short running
program just pass the key value to the long running program et voila.

Just make sure that the long running program deletes the record when it is
finished.

I know that using a file for parameter passing is not the most efficient
way but we were ask for an "easy" way and this way is easy and will work
even if there was several short running jobs calling several long running
jobs.

Another advantage is that that way, you are sure that both the calling and
called program use the same structure for the parameters (type, length,
position ...).

So this is my 2 cents

Hope this help


Denis Robitaille
Directeur Service technique TI
CASCADES INC.
412 Marie Victorin
Kingsey falls(Québec) Canada J0A 1B0
T : 819 363-6130
F : 819 363-6155
--
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.