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



You can use %Editc function to convert numeric to character or vise versa.

Ex: eval #charvar = %editc(#numvar:'4')

Check this link

http://publib.boulder.ibm.com/iseries/v5r1/ic2924/books/c0925083557.htm



Regards,

Chamara Withanachchi
IBM Certified Power System Expert
RPG Programmer
(owner of www.rpgiv.info)

WWW.RPGIV.INFO
Mob: +971 50 5698644
Tel: +971 6 5595887
chamaraw@xxxxxxxxxx
www.rpgiv.info
i want to be future ready. i want control. i want an i.


Sent from my BlackBerry® wireless device

-----Original Message-----
From: "Al" <macwheel99@xxxxxxxxxx>

Date: Wed, 25 Mar 2009 02:43:41
To: <midrange-l@xxxxxxxxxxxx>
Subject: Variable tips


My latest assignment is to construct a string of "fields" of variable
length, separated by commas, to supply a customer's specifications. My
source fields are predictable lengths, but I need to chop off leading zeros
& trailing blanks.



I expect I'll need a standard subroutine to do the chopping, one for
numeric, one for alpha fields, which will also return the resulting length
value, and the field edited, eg. 1234.567 (no commas at thousands, because
commas separate output fields) (decimal places vary but are fixed by field).



I am still unsure how to address (keep track of)

"we're now at field 14, sideways position 101" or whatever, maybe use report
ending position plus a # if a variable can go there for the plus value.



I'm on V5R1, more comfortable with RPG/400 than RPG/ILE. All my past
programming has been with fixed length fields.



I could use some tips as I stumble into this (for me) new mine field.



-

Al Macintyre

-

Home PC in midst of replacement.




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.