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



This may have nothing to do with your compile, but it did OK on v5r1 but 
you might want to look at this though:
  
 Program:   TESTR          Library:   BHOPKINS       Module:   TESTR  
      1 F**************************************************************** 
      2       D ObjectName      S             10A  
      3       D String          S             80A  
      4  
      5       C                   EVAL      String = 
%Replace(ObjectName:String 
      6       C %Scan('qqqqqqqqqq':String 
      7       C                                       %Size(ObjectName))   
 
      8  
      9        *This does compile:  
     10  
     11       C                   EVAL      String = 
%Replace(ObjectName:String 
     12       C %Scan('qqqqqqqqqq':String) 
     13       C                                      %Len(ObjectName))   
     14       C                   Eval      *Inlr  = *on  
     15 C**************************************************************** 
 Bottom 
 Debug . . .  
  
 F3=End program   F6=Add/Clear breakpoint   F10=Step   F11=Display 
variable 
 F12=Resume       F17=Watch variable   F18=Work with watch   F24=More keys 
 
 Receiver value too small to hold result.    +  

Note the message from above on line 5. 

%size returns length of field as 10 numeric constant 
%len returns length of what's inside of field 0-10 as number of bytes 
%replace fourth parm is looking for any numeric value or numeric expression 
with no decimal positions. 

Thanks 
Bill Hopkins





"Bob cozzi" <cozzi@xxxxxxxxx>
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
08/25/2003 09:10 AM
Please respond to RPG programming on the AS400 / iSeries

 
        To:     "'RPG programming on the AS400 / iSeries'" 
<rpg400-l@xxxxxxxxxxxx>
        cc: 
        Subject:        RE: %Len vs. %Size in %Replace


Don't see why you'd get an error on that. FYI, Parm 4 defaults to the 
length
of Parm1, so you wouldn't need either in your example.


Bob Cozzi
Cozzi Consulting
www.rpgiv.com


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of M. Lazarus
Sent: Sunday, August 24, 2003 12:58 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: %Len vs. %Size in %Replace

  Why doesn't %Replace() accept the %Size BIF in the 4th parm?

  This won't compile - it receives "RNF0384 The fourth parameter for 
%REPLACE is not valid."

ObjectName               10A
String           80A

C                EVAL String = %Replace( ObjectName :
                                                 String :
                                                 %Scan( 'qqqqqqqqqq': 
String ) :
                                                 %Size( ObjectName ) )

  This does compile:

C                EVAL String = %Replace( ObjectName :
                                                 String :
                                                 %Scan( 'qqqqqqqqqq': 
String ) :
                                                  %Len( ObjectName ) )

  -mark

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.