|
On Mon, 1 Apr 2002, James Rich wrote: > > Now it tells me that > > Keyword is not allowed for a field definition; keyword ignored. > > I guess V4R1 doesn't allow OVERLAY to be used with 5U? > (sigh) Probably doesn't allow you to overlay the data structure name, you probably have to overlay a field in the DS. So, the easy fix would be to use fixed start/end positions for each field in the DS. But, then the next thing will be that it doesn't like the for/endfor loop... So, rather than debug this line-by-line with you, here's a version that I tested and had working on V3R2. If it works on V3R2, it should work on V4R1, right? :) compile it with: CRTBNDRPG PGM(xxx) SRCFILE(xxx/xxx) DFTACTGRP(*NO) BNDDIR(QC2LE) H*DFTACTGRP(*NO) ACTGRP(*NEW) BNDDIR('QC2LE') D toupper PR 1A D character 1A const D test1 S 10A D x S 10I 0 D size S 10I 0 c eval test1 = 'fUnKy 123t' c eval size = %size(test1) c do size x c eval %subst(test1:x:1) = c toupper(%subst(test1:x:1)) c enddo 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 1 1A D dsCvtChar 2 2A D dsCvtInt 1 2U 0 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 mailing list archive is Copyright 1997-2025 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.