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



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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.