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




On Mon, 1 Apr 2002, James Rich wrote:
>
> V4R1 tells me that
>
> The length of an integer or unsigned field is not valid.
>
> when I define dsCvtInt above.  I suppose I could define it differently and
> use a move...

Yeah, the 3U 0 integer requires V4R4, I believe.  It's easy enough to
switch to a 5U 0, though.   Here's a new example, I hope it works, my
system does not have the ability to compile all the way back to V4R1.

     H DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('QC2LE')

     D toupper         PR             1A
     D   character                    1A   const

     D test1           S             10A
     D x               S             10I 0

     c                   eval      test1 = 'fUnKy 123t'
     c                   for       x = 1 to %len(test1)
     c                   eval      %subst(test1:x:1) =
     c                                   toupper(%subst(test1:x:1))
     c                   endfor

     c                   dsply                   test1
     c                   eval      *inlr = *on

      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      *  toupper() -- convert a character to uppercase (requires QC2LE)
      *
      *    args:
      *          character = character to convert to uppercase
      *
      * returns:
      *          uppercase character
      *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     P toupper         B                   export
     D toupper         PI             1A
     D   character                    1A   const

     d C_toupper       PR            10I 0 ExtProc('toupper')
     d   character                   10I 0 value

     D dsCvt           DS
     D   dsCvtFill                    1A
     D   dsCvtChar                    1A
     D   dsCvtInt                     5U 0 overlay(dsCvt:1)

     c                   eval      dsCvtFill = x'00'
     c                   eval      dsCvtChar = character
     c                   eval      dsCvtInt = C_toupper(dsCvtInt)
     c                   return    dsCvtChar

     P                 E




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.