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



Adam wrote:
I was considering hoping to use CL in the first place
because I need to call some vendor commands that get pretty ugly for
QCMDEXC.


Adam -
I disagree. You must not be using free-form RPG.

Example:

59800 p e
59900
**************************************************************************
60000 * PrCPYF - Copy Files.
60100
**************************************************************************
60200 p PrCPYF b export
60300 d PrCPYF pi 10I 0
60400 D FromFile 10A
11/06/08
60500 D FromLibrary 10A
60600 D ToFile 10A
11/06/08
60700 D ToLibrary 10A
60800 D MbrOpt 8A
60900
61000 D Message s 52 INZ(*BLANKS)
61100 D Message1 s 52 INZ('Error while Opening
file ')
61200 D Message2 s 52 INZ('Error while Copying
file ')
61300 /Free
61400
61500 Monitor;
61600 Open QAFDMBRL;
61700 On-Error *ALL;
61800 Eval Message = Message1 + 'QAFDMBRL';
61900 DSPLY Message;
62000 Return 1;
62100 Endmon;
62200
62300 Dou %eof(QAFDMBRL);
62400
62500 Read QWHFDML;
62600
62700 If %eof(QAFDMBRL);
62800 Close QAFDMBRL;
62900 Return 0;
63000 Endif;
63100
63200 If (MbrOpt = *blanks);
63300 Eval MbrOpt = '*REPLACE';
63400 Endif;
63500
63600 CommandString = 'CPYF FROMFILE(' +
63700 %Trim(Fromlibrary) + '/' +
63800 %Trim(MLFILE) + ') ' +
63900 'TOFILE(' + %Trim(Tolibrary)
+ '/' +
64000 %Trim(ToFile) + ') ' +
64100 'FROMMBR(' +
64200 %Trim(MLNAME) + ') ' +
64300 'TOMBR(' +
64400 %Trim(MLNAME) + ') ' +
64500 'MBROPT(' + MbrOpt + ') ' +
64600 'FROMRCD(1) FMTOPT(*MAP)';
64700
64800 Rc = ExecCmd(CommandString); // Execute Command
64900
65000 If Rc <> Success;
65100 Eval Message = Message2 + FromFile;
65200 DSPLY Message ;
65300 Return 1;
65400 Endif;
65500
65600 Enddo;
65700
65800 Close QAFDMBRL;
65900
66000 Return 0;
66100
66200 /End-Free




As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.