|
Hi all you wonderful people,
Well you would think that something as simple as CPYF would not be a very
difficult thing, but It's getting the best of me today to put it nicely. <grin>
I think I have tried just about every combination of (*CAT and quotes) that is
possible for the past (about 7 hours now). Incredible, yes!
No, this does not work. Try it in a CL, and don't get OPNQRYF confused with
CPYF. I do. : )
I am getting closer to a solution by a few people suggesting to create a Command
String for CPYF and calling QCMDEXC with the CPYF command string. I at least
have the &FPRDN working correctly (debug tells me so) and thank you Kevin for
your example! I just need to get the string correct now with the
FROMLIB(&LIBRARY/&FILE) variables, which is also in the command string. Brother,
now I'm having trouble with those little ole quotes and *cats with these
variables. What a fun day this turned out to be.
If anyone would like to suggest how to *Cat the (&LIBRARY / &FILE) parameters
within the command string, please feel free to share it with me. <grin>
Thank you each and everyone one for your input!
Darlene
|--------+----------------------->
| | "Peter Dow" |
| | <pcdow@MailAn|
| | dNews.com> |
| | |
| | 01/22/2001 |
| | 02:54 PM |
| | Please |
| | respond to |
| | RPG400-L |
| | |
|--------+----------------------->
>--------------------------------------------------------|
| |
| To: RPG400-L@midrange.com |
| cc: (bcc: Darlene H Bryant/Banpharm) |
| Subject: Re: Using CPYF with variables in CLP|
>--------------------------------------------------------|
Hi Darlene,
I see Ed's reply, but I don't see any response from you about it. I think he
has the right solution, but he didn't show you what he meant. Also, as I
modified your code, I noticed a couple of missing apostrophes. Try this:
DCL VAR(&FPRDN) TYPE(*CHAR) LEN(15)
CPYF FROMFILE(&LIBRARY/&FILE) +
TOFILE(QTEMP/BMHSP100X) FROMMBR(&FMEMBER) +
TOMBR(&TMEMBER) MBROPT(*ADD) +
CRTFILE(*YES) INCREL((*IF PRDNO *EQ +
'"' *CAT &FPRDN *CAT '"')) FMTOPT(*MAP *DROP) +
ERRLVL(*NOMAX)
HTH,
Peter Dow
Dow Software Services, Inc.
909 425-0194 voice
909 425-0196 fax
----- Original Message -----
From: "Ed Chabot" <echabot@marlinfirearms.com>
To: <RPG400-L@midrange.com>
Sent: Monday, January 22, 2001 7:21 AM
Subject: RE: Using CPYF with variables in CLP
> Try *CAT instead of *TCAT.
>
> Ed Chabot
> The Marlin Firearms Company
> 100 Kenna Drive
> North Haven, CT 06473
> (203)985-3254
>
> -----Original Message-----
> From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On
> Behalf Of dbryant@banpharm.com
> Sent: Monday, January 22, 2001 9:12 AM
> To: RPG400-L@midrange.com
> Subject: Using CPYF with variables in CLP
>
>
>
>
> I am testing a program that is selecting a product number to copy from one
> file
> member to another. The problem is the CPYF is truncating the blanks at the
> end
> of the variable. I cannot figure out how to retain the blanks at the end
of
> the
> variable in the CPYF. Can anyone help me please......
>
> DCL VAR(&FPRDN) TYPE(*CHAR) LEN(15)
>
> CPYF FROMFILE(&LIBRARY/&FILE) +
> TOFILE(QTEMP/BMHSP100X) FROMMBR(&FMEMBER) +
> TOMBR(&TMEMBER) MBROPT(*ADD) +
> CRTFILE(*YES) INCREL((*IF PRDNO *EQ +
> '" *TCAT &FPRDN *TCAT"')) FMTOPT(*MAP *DROP) +
> ERRLVL(*NOMAX)
>
> If I leave the variable alone, the CPYF truncates the blanks at the end of
> the
> variable and copies all records that begins with the non-blank portion of
> the
> variable.
> I have tried a number of combinations for catenating the variable to
enable
> it
> to retain the blanks so I can compare 15 characters with 15 characters,
but
> no
> luck. CPYF is definitely different from OPNQRY.
>
> I've tried the IBM on-line website(s) but they are experiencing problems
> with
> their Internal server.
>
> Any help is GREATLY appreciated!
> Darlene Bryant
>
>
> +---
> | 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
> +---
>
> +---
> | 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
> +---
+---
| 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
+---
+---
| 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.