× 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: A little RPG and a little CGI/Net.Data question.
  • From: "Simon Coulter" <shc@xxxxxxxxxxxxxxxxx>
  • Date: Sat, 15 Apr 00 11:44:25 +1000

G
Hello Dave,

I've only done this stuff from Java however you may find the following 
information 
useful.

\n is NOT a Carriage Return, it is a New Line or Line Feed.  Carriage Return is 
\r.  Some 
languages treat them synonomously (or treat \n like \r\n) but they are 
different.  If you 
debug the data received you should find that it is actually separated by both 
Carriage 
Return and Line Feed (i.e., \r\n).

Also x'15' is not what you should be searching for (x'15' is the DBCS Shift In 
character).  Octal 15 is a Carriage Return but that is x'0D', Line Feed is x'25 
in EBCDIC 
and x'0A' in ASCII.  Since the data sent from a browser is ASCII you probably 
should be 
searching for the ASCII code-points.

As I said earlier, debug the data received by your comment parser and see what 
is 
actually in the data stream.  I think most of your trouble is because you are 
not 
searching for the correct delimiter.  Search for \r (x'OD') and add 2 to get 
the start of 
the next comment.

Regards,
Simon Coulter.

«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
«» FlyByNight Software         AS/400 Technical Specialists       «»
«» Eclipse the competition - run your business on an IBM AS/400.  «»
«»                                                                «»
«» Phone: +61 3 9419 0175      Mobile: +61 0411 091 400           «»
«» Fax:   +61 3 9419 0175      mailto: shc@flybynight.com.au      «»
«»                                                                «»
«» Windoze should not be open at Warp speed.                      «»
«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»«»
//--- forwarded letter -------------------------------------------------------
> Date: Fri, 14 Apr 2000 09:26:52 -0400
> From: dmosley@dancik.com
> To: RPG400-L@midrange.com
> Reply-To: RPG400-L@midrange.com
> Cc: terry@dancik.com
> Subject: A little RPG and a little CGI/Net.Data question.

> 
> 
> 
> Alright Mr. Stone, let's see you shine.
> 
> Here's my situation.  I am creating a <TEXTAREA COLS=50 ROWS=10>, in HTML
> obviously,  to allow users to enter comments in.  Once the user has submitted
> his/her entree, and continues to the next URL, which is accessed via 
>Net.Data, I
> do a @DTW_directcall function that passes the users comments and the comments
> length to an RPGLE program, using simple parameter pass.  The program  should
> read the comments entered and break them down and written to a physical file.
> The file layout is as such.  SEQ#- 3,0 & TEXT - 50a.  The comments should be
> broken  so that each row entered would be considered a SEQ# increment.  My
> problem is breaking down the comments, once it is passed to the RPGLE program.
> I created a procedure that I thought would break it down properly, BUT, the
> comments value being passed to the program does not appear to have Carriage
> Returns (\n)(x'15'), so I can't figure out were to %subst the comments to a 
>new
> record.
> 
> 
> Ex) TEXTAREA :                                PHYSICAL FILE RECORDS (What
> records should be written)
>             COMMENTS                               SEQ#      TEXT
>      ROW 1 :  This is were the comments would go.            1    This is were
> the comments would go
>      ROW 2 :
>      ROW 3 : This would be considered SEQ# 3.                3    This would 
>be
> considered SEQ# 3.
>      ROW 4:
>      ROW 5: And this would be considered SEQ# 5.             5    And this 
>would
> be considered SEQ# 5.
> 
> 
> I hope that this explained it well enough for you all.  Any suggestions would 
>be
> greatful.
> thanks
> dave
> 
> 
> 
> 
> 
> +---
> | 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.