Re: writing cariage return character

From: JerryMouse (nospam_at_bisusa.com)
Date: 06/11/04


Date: Fri, 11 Jun 2004 06:58:17 -0500

hpy_awad@yahoo.com wrote:
> My Cobol is RMCOBOL, And I am trying to I write new line into an
> input.fil say my record is :
>
> 01 file-record.
> 02 emp_no pict 9(4).
> 02 filler pict x(2).
> 02 name pict x(20).
> 02 ---writing carraige return character--Howw ???

02 file-crlf pic x(2).

....
MOVE X'0D0A' to file-crlf.

If your SELECT statment contains

   ORGANIZATION IS LINE SEQUENTIAL

the compiler will insert these characters for you automatically. In other
words, each record becomes two bytes longer than your FD definition and
these extra two bytes contain 0D0A (carriage return/line feed).



Relevant Pages

  • Re: variable length in REDEFINES
    ... INSPECT ERRLOC TALLYING SQL-ERRLOC-LEN FOR CHARACTERS BEFORE INITIAL ' ... Can't you write user-defined functions in VSE Cobol? ... The STORED-CHAR-LENGTH function is specific to Win32, ... FUNCTION STORED-CHAR-LENGTH (argument-1) ...
    (comp.lang.cobol)
  • Re: Fw: Hex to Decimal Conversion in COBOL
    ... I don't know why a COBOL source solution is absolute- ... the "abcde" string would be replaced by the entire 255 hex ... in unprintable characters also. ...
    (bit.listserv.ibm-main)
  • Re: Condition code
    ... characters' was already in some code I have running and I added your ... That is why your code won't compile. ... I thought this code was instructive because it shows a feature of cobol ... To join/leave the list, search archives, change list settings, * ...
    (comp.sys.hp.mpe)
  • Re: Data Records from Flat File (COBOL Style)
    ... The COBOL PIC clause absolutely does not have an internal length. ... characters to another place in memory and adds a length (in this case, ... Picking the fields out of a larger string ... The compiler may or may not generate instructions to make ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Regular Expressions and Standard COBOL (was Re: Use of Class conditions in COBOL)
    ... made part of the COBOL language standard. ... specifying the REs. ... national characters. ... Certain common patterns ...
    (comp.lang.cobol)