× 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: copy file problem / documented 'feature'
  • From: RBBaird@xxxxxxxxxxx
  • Date: Thu, 28 Sep 2000 10:55:29 -0500

>Date: Wed, 27 Sep 2000 17:05:23 -0500
>From: Jim Langston <jlangston@conexfreight.com>
>Subject: Re: MIDRANGE-L Digest V3 #730

>Have you tried making &Name equal to ''TEST     '' ?

>CHGVAR  &NAME '''TEST    '''

>('' = single quite inside quotes.  first ' is for the entire string.  ' ''test    '' ' would come
>out to ' 'test    ' ')

>Regards,

>Jim Langston

Jim,

Tried this:

CHGVAR &WRK ('''' *CAT &NAME *BCAT '''')

which gives &wrk as "'TEST '      "

CPYF       FROMFILE(file1) TOFILE(lib1/file2) +
           MBROPT(*REPLACE) CRTFILE(*YES) +
           INCREL((*IF DQNAME *EQ &WRK))

which because CPYF command processor automagically inserts quotes for char strings, processes as:

CPYF       FROMFILE(file1) TOFILE(lib1/file2) +
           MBROPT(*REPLACE) CRTFILE(*YES) +
           INCREL((*IF DQNAME
*EQ '''TESTX '''))

which returns no records because no DQNAME begins with a quote.

Nice try though, thanks for playing :)

 

>Date: Thu, 28 Sep 2000 12:47:40 +0100
>From: "Brendan Bispham" <midrangel@black-and-blue.com>
>Subject: Re: MIDRANGE-L Digest V3 #727

>There are other solutions, but you might overcome the problem with another
>field (changes in lowercase):

>>          DCL        VAR(&NAME)    TYPE(*CHAR) LEN(10)
>dcl &namel *char 10
>chgvar &namel (&namel *tcat 'A')

>>         CPYF       FROMFILE(file1) TOFILE(lib1/file2) +
>>                       MBROPT(*REPLACE) CRTFILE(*YES) +
>>                       INCREL((*IF DQNAME *EQ &NAME))
> (*and dqname *lt &namel))
>>

Brendan,

This works! (probably should use a cent sign or period instead of "A" in case DQNAME contains special characters).

Still not very clear or elegant, but a workable work-around.  

+--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-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.