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



Rob,



I think Scott found the issue. Your dump shows an entry.d_name of '. ' with an entry.c_namelen of 1.



So your starting %subst position will be -2 (name:entry.d_namelen-3 = -2).



Maybe adding an additional if statement group?



if (entry.d_namelen > 4) // A directory has at least a single character name

name = %subst(entry.d_name: 1: entry.d_namelen);

if %xlate(lo:up:%subst(name:entry.d_namelen-3:4))='.NSF';

except print;

endif;

endif;





-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Scott Mildenberger
Sent: Tuesday, November 20, 2012 12:29 PM
To: RPG programming on the IBM i / System i
Subject: RE: MCH1210 - Receiver value too small to hold result.



Can you step into the procedure in debug to see where in the procedure the error is occurring. I do see that the entry you are processing has a name of '.' and a namelen of 1, it doesn't look like your program expects that. This will give you a negative starting position in the %subst at line 70, not sure if that would cause the error you get.



Scott Mildenberger





-----Original Message-----

From: rpg400-l-bounces@xxxxxxxxxxxx<mailto:rpg400-l-bounces@xxxxxxxxxxxx>

[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of rob@xxxxxxxxx<mailto:rob@xxxxxxxxx>

Sent: Tuesday, November 20, 2012 1:16 PM

To: rpg400-l@xxxxxxxxxxxx<mailto:rpg400-l@xxxxxxxxxxxx>

Subject: MCH1210 - Receiver value too small to hold result.



I am getting a MCH1210 error

Statement in Error . . . . . . . . . . : 00001273

RPG Routine . . . . . . . . . . . . . : DRILLDOW

Number of Parameters . . . . . . . . . :

Message Type . . . . . . . . . . . . . : MCH

Additional Message Info . . . . . . . : 1210

Message Data . . . . . . . . . . . . . :

Receiver value too small to hold result.



DrillDown(DirectoryName); // MCH1210 error here!!!!!



Source listing

http://code.midrange.com/2c08ed8d39.html



Compile listing

http://code.midrange.com/598444bec7.html



Dump

http://code.midrange.com/24669d27c8.html





Rob Berendt

--

IBM Certified System Administrator - IBM i 6.1 Group Dekko Dept 1600 Mail to: 2505 Dekko Drive

Garrett, IN 46738

Ship to: Dock 108

6928N 400E

Kendallville, IN 46755

http://www.dekko.com



--

This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx<mailto: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<mailto: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 IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx<mailto: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<mailto: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 ...

Replies:

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.