Interestingly subroutines work up to either 32k or 4k limit.
SUBSTR has 32k input limit but UPCASE has a max of 4k as this example shows
works
DEFINE FILE CAR
FCHAR/A4094 WITH COUNTRY = ' ' ;
VCHAR/A4095V = FCHAR | 'x' ;
VCHARX/A4095V = UPCASE(4095,VCHAR,'A4095') ;
VCHARLEN/I9 = LENV(VCHARX,'I9');
SS/A10 = SUBSTR(4095,VCHARX,4095,4095,1,'A1V') ;
SSORIG/A10 = SUBSTR(4095,VCHAR,4095,4095,1,'A1V') ;
END
TABLE FILE CAR
PRINT COUNTRY FCHAR VCHAR VCHARLEN SS SSORIG
END
does not work in that SS is blank instead of X
DEFINE FILE CAR
FCHAR/A4095 WITH COUNTRY = ' ' ;
VCHAR/A4096V = FCHAR | 'x' ;
VCHARX/A4096V = UPCASE(4096,VCHAR,'A4096') ;
VCHARLEN/I9 = LENV(VCHARX,'I9');
SS/A10 = SUBSTR(4096,VCHARX,4096,4096,1,'A1V') ;
SSORIG/A10 = SUBSTR(4096,VCHAR,4096,4096,1,'A1V') ;
END
TABLE FILE CAR
PRINT COUNTRY FCHAR VCHAR VCHARLEN SS SSORIG
END
Server: WF 7.6.2 ( BID/Rcaster) Platform: W2003Server/IIS6/Tomcat/SQL Server repository Adapters: SQL Server 2000/Oracle 9.2
Desktop: Dev Studio 765/XP/Office 2003 Applications: IFS/Jobscope/Maximo