|
For a long time now I execute all my overrides,etc inside my RPG using QCMDEXC. Just specify USROPN on the F spec. Create your command string for the override, execute via QCMDEXC then open the file & process. Works really nice IMO... -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Igor.Beslic@xxxxxxxxxxxx Sent: Friday, September 02, 2005 2:02 AM To: rpg400-l@xxxxxxxxxxxx Subject: Using CL to call RPG pgms Hello! I have almost 1,5 year expirience in ILE RPG IV and now I realized that almost evry RPG pgm I've made needed additional CL pgm that shold prepare LIBL, clear output PFs and perform similar actions after pgm finises... I'm wondering would it be to complicated to perform all this within RPG pgm (for example in separate module or subprocedure) with use of different APIs (QCMDEXC) and explicit file OPENing. (inexaple. if I define file in f spec with USROPN keyword would I get err. message if file is not in LIBL on pgm start). I suppose there exist some actions (as file override options for RPG pgm that will be run) that must be defined in CL?? What is better practice? It's probably metter of programers style but it would be nice to know how other programers do that. Is there any situation when this start actions should be performed in CL? And at last, I realized that all the time I was repeating one error: when I compiled CL I got OPM CL that calls ILE RPG, what makes my pgms runs in different ACTGRPs and in case of unhandled exceptions I get inquiry msg for RPG (when its ACTGRP scope ends) and same inquiry for default OPM CLs ACTGRP. Should it be enough to create CL source with CLLE attribute and compile ILE CL it with ACTGRP(*NEW) or some named ACTGRP and copmpile RPG PGMs with ACTGRP(*CALLER)? Is there some good literature about ILE CL and some rules that should be respected when use it to interact with ILE RPG?? I hope that questions aren't too wide :) With regards, Igor Bešlić, dipl. ing. rač. VOLKSBANK d.d. OJ Informatika Zelinska 2, 10000 Zagreb tel: +385 1 4801 895 -- This is the RPG programming on the AS400 / iSeries (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 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.