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



Hi,
 
I am reading a long string (15,000 bytes) and writing the string into
IFS. I use the APIs open( ) to open an IFS file and write( ) to write
into the IFS file.
 
The problem I am facing is this:
When I write the string into the IFS stream file, the IFS stream file
has a width of 4099. After 4099 bytes, there is an end-of-line character
denoted by a Carriage return and the rest of the data appears in the
next line. 
 
The code that I using is this:
------------------------------------------------------------------------
-------------------------------------------------------------
D O_CREAT         S             10I 0 INZ(8)
D O_RDWR          S             10I 0 INZ(4)
D O_TEXTDATA      S             10I 0 INZ(16777216) 
D O_CODEPAGE      S             10I 0 INZ(8388608)  
D O_CCSID         S             10I 0 INZ(32)       
D Oflag           S             10I 0 INZ(0)  
D Omode           S             10U 0 INZ(511)
D cp              S             10U 0 INZ(819)
D FileNam         S             50A                      
D FileNamP        S               *   INZ(%ADDR(FileNam))
D ZeroBin         S              1A   INZ(*ALLX'00')     
D MSG             S          65000A                  
D MSGP            S               *   INZ(%ADDR(MSG))
 
C                   EVAL      FileNam = Path                    
C                   EVAL      FileNam = %TRIM(FileNam) + ZeroBin
C                   EVAL      Fd=open(FileNamP:Oflag:Omode:cp)
 
C                   Z-add     O_CREAT       Oflag
C                   Add       O_RDWR        Oflag
C                   Add       O_CCSID       Oflag
C                   Add       O_TEXTDATA    Oflag
 
C                   EVAL      Fd=open(FileNamP:Oflag:Omode:cp)
 
C                   EVAL      MSG = %TRIM(MSG) + ZeroBin 
 
C                   EVAL      RT=write(FD:msgP:%len(msg))
 
C                   Eval      RT=close(fd)               
------------------------------------------------------------------------
------------------------------------------------------------------------
--
 
What I want to know is this: 
1. How and where is this constraint of 4099 specified. The documentation
of write( ) API does not specify any such constraint. 
2. Is it possible to write the stream file without the carriage return
at the end-of-line?
 
 
Regards
Kumaravel
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly 
prohibited and may be unlawful.

                Visit us at http://www.cognizant.com

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.