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


  • Subject: Re: Antwort: Using CPYF with variables in CLP
  • From: dbryant@xxxxxxxxxxxx
  • Date: Mon, 22 Jan 2001 11:01:21 -0500



How would I key the CPYF syntax in the CLP?
------------------------------------------------------------------

Example:
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)

If I key it like this, it will compile okay, but will not execute...
      4500 - CPYF FROMFILE(*LIBL/BMHSP100) TOFILE(QTEMP/BMHSP100X)
      FROMMBR(M202) TOMBR(M102) MBROPT(*ADD) CRTFILE(*YES) INCREL((*IF PRDNO
      *EQ '" *CAT &FPRDN *CAT "')) FMTOPT(*MAP *DROP)
    Value in INCREL expression number 1 not valid.
    Copy command ended because of error.

I've also tried  ' ' ' *CAT &FPRDN *CAT ' ' '  (this will compile okay too, but
same error message).

Thanks for your help on this subject!



|--------+---------------------------->
|        |          martin.nageler@bau|
|        |          holding.at        |
|        |                            |
|        |          01/22/2001 10:28  |
|        |          AM                |
|        |          Please respond to |
|        |          RPG400-L          |
|        |                            |
|--------+---------------------------->
  >--------------------------------------------------------|
  |                                                        |
  |       To:     RPG400-L@midrange.com                    |
  |       cc:     (bcc: Darlene H Bryant/Banpharm)         |
  |       Subject:     Antwort: Using CPYF with variables  |
  |       in CLP                                           |
  >--------------------------------------------------------|







hi darlene,

i hope i understood your problem correct. you are using *tcat-command: that
means truncate and catenate. try the *Cat-command. this one won't truncate
the blanks.

hth

martin



                    dbryant@banpharm.
                    com                      An:     RPG400-L@midrange.com
                    Gesendet von:            Kopie:
                    owner-rpg400-l@mi        Thema:  Using CPYF with variables
in CLP
                    drange.com


                    22.01.2001 15:11
                    Bitte antworten
                    an RPG400-L







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
+---

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.