Search found 5 matches

by sps
Thu Jul 24, 2025 6:34 pm
Forum: General
Topic: WRKQRY's rounding process
Replies: 0
Views: 7544

WRKQRY's rounding process

I extracted the SQL of a "summary only" WRKQRY using RTVQMQRY. The query has "Use Rounding" set to Y. I've done this before, and with some tweaking and using aggregate functions, have been able to replicate queries in SQL accurately. In this case, however, I kept running into errors when trying to ...
by sps
Thu Jul 10, 2025 6:23 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 6
Views: 33098

Re: Trimming prototype/interface variables only works with certain lengths

Scott Klement wrote: Wed Jul 09, 2025 11:27 pm hope that helped.
It did. Many thanks!
by sps
Mon Jun 30, 2025 1:23 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 6
Views: 33098

Re: Trimming prototype/interface variables only works with certain lengths

As a follow-up:

I understand that CALL will send a char(32), so if my prototype expects a char(32) (or shorter) and I send a parm that is 7 characters long, then the trim works as expected because my program's receiving a char(32), comprised of my 7 char string and 25 blanks at the end.

If ...
by sps
Fri Jun 27, 2025 11:50 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 6
Views: 33098

Re: Trimming prototype/interface variables only works with certain lengths

Ah, thank you both--that makes sense. I appreciate the education!
by sps
Fri Jun 27, 2025 8:49 pm
Forum: RPG IV
Topic: Trimming prototype/interface variables only works with certain lengths
Replies: 6
Views: 33098

Trimming prototype/interface variables only works with certain lengths

I have a program with a Main prototype (and matching pi) containing two char parameters. In my program, I'm ascertaining the "actual" lengths of the input parameters using %len and %trim, like so:

%len(%trim(var1));

I'm testing this by calling it from green screen and passing it params of length 7 ...