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


  • Subject: RE: Beginner needs help w/ decimal field to text field
  • From: Scott Mildenberger <Smildenber@xxxxxxxxxxxx>
  • Date: Thu, 19 Oct 2000 09:58:49 -0600

You might want to look at CPYTOIMPF to see if it can be used to create the
file you want.  If not, I would strongly recommend that you use RPG IV to
create this program (or at least create little callable programs to do
functions like this for the main program).  RPG IV makes this so easy to do
useing %editc and it's string handling capabilities that it will definitely
make the effort to figure it out worth the time.  And we are always here to
help answer RPG IV questions.

Scott Mildenberger

> -----Original Message-----
> From: Jason Waugh [SMTP:jwaugh@collectcorp.com]
> Sent: Thursday, October 19, 2000 9:06 AM
> To:   RPG400-L@midrange.com
> Subject:      Beginner needs help w/ decimal field to text field
> 
> I have a decimal field... 9 digits, 2 decimals.  I need to move it into a
> character field of 14 characters, complete with negative sign and decimal.
> I need it to be left justified and padded with blanks.  Examples:
> 
> 9.32 (00000000932)   should become   '9.32          '
> -456.34 should become '-456.34       '
> 
> 
> I saw a discussion about this recently, but the solutions given were to
> use the edit code functions available in ILE and I am using RPG/400.
> 
> 
> I'm pulling data from a database (externally described) and trying to
> create a tab delimited ASCII file out of it for one of our clients.  After
> I have managed to obtain this value, I will be concatenating a horizontal
> tab to the end of it (hence I need 14 characters - an extra one for the
> tab in case the number happens to be 11 digits, and negative, occupying 13
> characters).  I will then be concatentating this 14 character string to
> the rest of a string I've already built up, which will then finally be
> written as a line in a text file.
> 
> (this is something that will be created often, *ideally* not by me, so
> using PC tools to make the resulting file tab delimited is not an option)
> 
> 
> Any help is appreciated.
> 
> 
> 
> 
> 
> 
> Thanks,
> 
> Jason Waugh
> Systems Development
> COLLECTCORP, INC.
> (416)935-2883
> 
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator:
> david@midrange.com
> +---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.