Heh. I was teasing.... :-))
Paul Nelson
Cell 708-670-6978
Office 512-392-2577
nelsonp@xxxxxxxxxxxxx
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Birgitta Hauser
Sent: Wednesday, June 20, 2012 7:26 AM
To: 'Midrange Systems Technical Discussion'
Subject: AW: How to call a RPG program from a RPG program?
Nothing is wrong with RPGIV...
But why bother to build with the call command, passing this string to a
sub-procedure which itself calls QCMDEXC API to execute the call?
Why not calling it directly with the RPG command CALL or CALLP?
And if he wants to mimic the system procedure to call a program, why not
executing it directly?
And why an internal procedure, instead of having an external one (which
indeed exists!) to execute an CL command?
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] Im Auftrag von Paul Nelson
Gesendet: Wednesday, 20.6 2012 13:40
An: 'Midrange Systems Technical Discussion'
Betreff: RE: How to call a RPG program from a RPG program?
What's wrong with RPGIV?
Paul Nelson
Cell 708-670-6978
Office 512-392-2577
nelsonp@xxxxxxxxxxxxx
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Birgitta Hauser
Sent: Wednesday, June 20, 2012 12:12 AM
To: 'Midrange Systems Technical Discussion'
Subject: How to call a RPG program from a RPG program?
A new way to call a RPG program from a different RPG program!
I found the following code snippet this morning in a program written in
April 2012!!!
Both programs are written in RPGIV!!!
Aaaaaaaaaarrrrrrgh!
D DW_System PR 10i 0
d cmd 2048 varying value
D dsallpf ds qualified
D fil 10A
D lib 10A
...
/Free
dw_system('CALL PGM(DSYUNIQUE) PARM('''+
dsallpf.fil+''' '''+
dsallpf.lib+''' ''0'')');
...
/End-Free
P DW_System B
*
D DW_System PI 10i 0
d cmd 2048 varying value
d cmdval s 2046 based(cmdval_p)
*------------------------------------------------------------------------
c eval cmdval_p=%addr(cmd)+2
c eval cmdlen=%len(cmd)
c call 'QCMDEXC' 50
c parm cmdval
c parm cmdlen 15 5
c 50 return -1
c return 0
P DW_System e
Mit freundlichen Grüßen / Best regards
Birgitta Hauser
"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"
--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx To subscribe, unsubscribe,
or change list options,
visit:
http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a
moment to review the archives at
http://archive.midrange.com/midrange-l.
As an Amazon Associate we earn from qualifying purchases.