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



Funny,
I just realized the chars I needed as you sent it, but thanks.

D @EoL            C                   CONST(X'0D25')

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
___________________________________________________________________________
Success is going from failure to failure without a loss of enthusiasm. - 
Sir Winston Churchill




"JK" <johnking@xxxxxxx> 
Sent by: rpg400-l-bounces@xxxxxxxxxxxx
2006/09/21 03:33 PM
Please respond to
RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>


To
"'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
cc

Subject
RE: Conversion program






A cr/lf embedded in the string will force a new line. See:
http://www.experts-exchange.com/Programming/Programming_Platforms/AS400/Q_20

787101.html

I /copy 'HexConst_h' into RPG programs and use:
"%trim(line1) + @EoL + %trim(line2)"

Doing a write() to IFS (CCSID 437) handles the ASCII conversion.

D*** write to an IFS file 
Dwrite            PR            10I 0 EXTPROC('write')
D  filehandle                   10I 0 VALUE 
D  datatowrite                    *   VALUE 
D  nbytes                       10U 0 VALUE 


*=========================================================
* Name...: HexConst_h
* Purpose: Named hex constants
* Notes..:
* Log....:
* 23Jun05 JEK- Corrected @SLASH from '97' to X'61', added others
*=========================================================
* Useful constants
D @Amper          C                   CONST(X'50')
D @Apost          C                   CONST(X'7D')
D @Aster          C                   CONST(X'5C')
D @At             C                   CONST(X'7C')
D @Cents          C                   CONST(X'4A')
D @Colon          C                   CONST(X'7A')
D @Comma          C                   CONST(X'6B')
D @CR             C                   CONST(X'0D')
D @DblQuote       C                   CONST('"')
D @Dollar         C                   CONST(X'5B')
D @EoL            C                   CONST(X'0D25')
D @Equal          C                   CONST(X'7E')
D @Exclaim        C                   CONST(X'5A')
D @False          C                   CONST('0') 
D @GreatThan      C                   CONST(X'6E')
D @LF             C                   CONST(X'25')
D @LessThan       C                   CONST(X'4C')
D @NotSign        C                   CONST(X'5F')
D @NumberSign     C                   CONST(X'7B')
D @Null           C                   CONST(X'00')
D @Minus          C                   CONST(X'60')
D @ParenR         C                   CONST(X'5D')
D @ParenL         C                   CONST(X'4D')
D @Percent        C                   CONST(X'6C')
D @Period         C                   CONST(X'4B')
D @PlusSign       C                   CONST(X'4E')
D @Question       C                   CONST(X'6F')
D @Quote          C                   CONST('''') 
D @SemiColon      C                   CONST(X'5E')
D @Slash          C                   CONST(X'61')
D @SlashL         C                   CONST(X'E0')

JK

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx 
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Ron Power
Sent: Thursday, September 21, 2006 12:16 PM
To: RPG programming on the AS400 / iSeries
Subject: Conversion program

We currently have a green screen RPG program that tracks our hardware. I
was given the task of re-writing in JAVA.  Now I'm writing the 
conversion
program using RPG, but I've come across a problem and have tried 
searching
the archives, but I don't even know what I should be searching for.  We
have the existing file has 4 fields for comments, these are being
concatenated into one larger field.  However, I need to have an "ENTER"
key put in after each line so that when it displays in a TEXTAREA on a 
jsp
page it looks like it was formatted in word kinda.  David, if I'm in the
wrong list, sorry, but it is an RPG conversion program.  I think what 
I'm
looking for is a hex code to replace the enter???  Maybe, does anyone 
even
know what I'm trying to ask lol.  Man, I wish today was tomorrow.

Ron Power
Programmer
Information Services
City Of St. John's, NL
P.O. Box 908
St. John's, NL
A1C 5M2
709-576-8132
rpower@xxxxxxxxxx
http://www.stjohns.ca/
at http://archive.midrange.com/rpg400-l.


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.