Reading variable block files AIX cobol

From: kprasann (ashprav_at_rediffmail.com)
Date: 10/12/04


Date: Mon, 11 Oct 2004 20:21:25 -0400

When trying to read a VB file from AX cobol program, the read terminates
when encountering a null (x'00') in the record and the record gets
truncated. But the read is fine for a FB file! Anyone aware of this, pls
help. Thanks!
sample code(declaration section alone)
---------------------------------------
IDENTIFICATION DIVISION.
PROGRAM-ID. filepgm.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
FILE-CONTROL.
SELECT MY-IN-FILE ASSIGN TO NAT-INPUTFILE
       ORGANIZATION IS LINE SEQUENTIAL
       ACCESS IS SEQUENTIAL
       FILE STATUS IS WS-IFSCODE.
SELECT MY-OUT-FILE ASSIGN TO NAT-OUTPUTFILE
       ORGANIZATION IS LINE SEQUENTIAL
       ACCESS IS SEQUENTIAL
       FILE STATUS IS WS-OFSCODE.
*------------------------------------------------------*
DATA DIVISION.
FILE SECTION.
FD MY-IN-FILE
    RECORDING MODE IS V
    RECORD IS VARYING
    LABEL RECORDS ARE STANDARD.
01 MY-IN-FILE-RECORD PIC X(8).
FD MY-OUT-FILE
    RECORDING MODE IS V
    RECORD IS VARYING
    LABEL RECORDS ARE STANDARD.
01 MY-OUT-FILE-RECORD PIC X(8).



Relevant Pages

  • Re: How to JUDGE what is "Good COBOL"
    ... judge if a COBOL program contains "good COBOL". ... We want to know how fast it runs on a production ... techniques that are generally available (whether they are in a current standard ... Test plans are not available at code review time. ...
    (comp.lang.cobol)
  • Re: How to JUDGE what is "Good COBOL"
    ... judge if a COBOL program contains "good COBOL". ... PERFORM NEXT-ASSIGNMENT ... techniques that are generally available (whether they are in a current standard ... are available but specific to the environment where it is intended to run? ...
    (comp.lang.cobol)
  • Re: How to JUDGE what is "Good COBOL"
    ... code use "standard" techniques that are generally available (whether they ... first COBOL program I was asked to modify wriiten by Lt. JG McClure. ... them meaningless and he added meaningless IFs withn these names to make it ... For Robert I suspect any mainframe COBOL program is a bad one. ...
    (comp.lang.cobol)
  • Re: Ayncrhonous (was: If you were inventing CoBOL...
    ... >> A COBOL program, by ... >> The COBOL standard doesn't provide for that either. ... > Again, I may have missed either a change in the request or the progress, ... I'd say the asynchronicity available on Unisys MCP systems is rather more ...
    (comp.lang.cobol)
  • Re: Comp-3 data
    ... consecutive "05" level datanames, and if OP is using "anything other ... than a COBOL program " to look at the raw data ... the alignment ("slack bytes") is significant. ... ('89 standard, don't know about 2002. ...
    (comp.lang.cobol)