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



Another way is to create a self-submitting CL. You use RTVJOBA to find
out whether it's running in batch already or if it's interactive. If
it's running interactively, the CL submits itself to batch. In this
example, you'd call this CL CL_PGM, and you just call it (via a
prototype), and it will submit the call to batch for you.

PGM PARM(&packparm)

DCL VAR(&TYPE) TYPE(*CHAR) LEN(1)
DCL VAR(&PACKPARM) TYPE(*DEC) LEN(9 2)

RTVJOBA TYPE(&TYPE)

IF COND(&TYPE = '1') THEN(DO)
SBMJOB CMD(CALL PGM(CL_PGM) PARM(&PACKPARM))
RETURN
ENDDO
CALL VENDOR_PGM PARM(&PACKPARM)
ENDPGM

In your RPG



D CallCLPGM PR Extpgm( 'CL_PGM' )
D Packed_ 9 2

D Packed S 7 0


/free
Packed = 1234567.89;
Callclpgm(Packed);

Francis Lapeyre
IS Dept. Programmer/Analyst
Stewart Enterprises, Inc.
E-mail: flapeyre@xxxxxxxx

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx
Sent: Tuesday, May 15, 2007 10:23 AM
To: RPG programming on the AS400 / iSeries
Subject: Re: Packed decimal parameters

Josh,

What ARE you trying to do? Submit a job or call a program or what? On
a
straight call, people use packed data as parameters all the time - no
problem. SBMJOB is where you run into problems. And someone already
posted the FAQ on that. Read that - it is golden. I STRONGLY suggest
the
command interface as a solution. At one time someone documented a
technique to take a CLP source member, and by some strategic copying and

pasting copy and convert it to a CMD member.
I forget who this genius was but here's the link:
http://faq.midrange.com/data/cache/576.html


Rob Berendt

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.