|
----- Forwarded by Darlene H Bryant/Banpharm on 01/23/2001 07:09 AM -----
|--------+------------------------>
| | Darlene H |
| | Bryant |
| | |
| | 01/22/2001 |
| | 04:50 PM |
| | |
|--------+------------------------>
>-------------------------------------------------------|
| |
| To: Buck Calabro |
| <buck.calabro@aptissoftware.com> |
| cc: |
| Subject: RE: Using CPYF with variables in CLP|
| (Document link not converted) |
>-------------------------------------------------------|
Thank you, Buck. I needed that!
Guess what? It's working!!!.... THANKS to all of your *most appreciated*
replys.
God bless you everyone!
------------------------------------------------------------------------------------------------
Final Solution:
DCL VAR(&FPRDN) TYPE(*CHAR) LEN(15)
CHGVAR VAR(&CMD) VALUE(' CPYF FROMFILE(' *CAT +
&LIBRARY *TCAT '/' *CAT &FILE *TCAT ') +
TOFILE(QTEMP/BMHSP100X) FROMMBR(' *CAT +
&FMEMBER *TCAT ') TOMBR(' *CAT &TMEMBER +
*TCAT ') MBROPT(*ADD) CRTFILE(*YES) +
INCREL((*IF PRDNO *EQ ' *CAT '''' *CAT +
&FPRDN *CAT '''' *CAT ')) FMTOPT(*MAP +
*DROP)')
CALL PGM(QCMDEXC) PARM(&CMD 250)
-------------------------------------------------------------------------------------------------
Darlene Bryant
|--------+-------------------------------->
| | Buck Calabro |
| | <buck.calabro@aptissof|
| | tware.com> |
| | |
| | 01/22/2001 04:34 PM |
| | |
|--------+-------------------------------->
>--------------------------------------------------------|
| |
| To: Darlene H Bryant/Banpharm@Banpharm |
| cc: |
| Subject: RE: Using CPYF with variables in CLP|
>--------------------------------------------------------|
You go, girl!
Here you go:
DCL &FILE *CHAR 10
DCL &LIB *CHAR 10
CHGVAR &FILE 'MASTER'
CHGVAR &LIB 'BUCK'
CHGVAR &STRING 'Buck'
CHGVAR &STRINGQ ('''' *CAT &STRING *CAT '''')
/* Build the copy command */
CHGVAR &cmd ('cpyf ' *CAT &LIB *TCAT '/' *CAT &FILE *TCAT +
' qtemp/m crtfile(*yes) +
increl((*if name *eq ' *cat &stringQ +
*tcat '))' +
)
call qcmdexc (&cmd &length)
Buck
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.