IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Error in file handling


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
vicharapusrinu
Warnings : 1

New User


Joined: 04 Dec 2006
Posts: 63
Location: Hyderabad

PostPosted: Tue May 21, 2013 12:52 pm
Reply with quote

can some one help me please on below points?
1. My i/p file is ISAM file and out file is VB file, I have declared like below in my cobol program but, system is treating I/P,O/P file is FB, can you please help me on this

my declaration:-

Code:
FILE-CONTROL.                       
       SELECT IN-FILE ASSIGN TO DD1
       ORGANIZATION IS SEQUENTIAL. 
       SELECT OUT-FILE ASSIGN TO DD2
       ORGANIZATION IS SEQUENTIAL. 
DATA DIVISION.                     
FILE SECTION.                       
FD IN-FILE                         
..
..
FD OUT-FILE.                         
       RECORD VARYING FROM 1 TO 9000.
01  OUT-REC.   


Error I am Getting

Code:
A "RECORDING MODE" of "F" was assumed for file "IN-FILE".
                                                         
A "RECORDING MODE" of "F" was assumed for file "OUT-FILE".
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Tue May 21, 2013 1:33 pm
Reply with quote

Is that an error or an information?

You would have got the indication

Code:
 IGYGR1216-I


Here I stands for information

And if you wanted to avoid that you need to provide

Code:
RECORDING MODE IS F


In FD.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue May 21, 2013 1:47 pm
Reply with quote

If you show code which won't compile and error messages which are incomplete, you make it difficult to offer assistance.

In your ISAM documentation, it should tell you how to define a file to a COBOL program.

For your output VB, I'd guess you have a single fixed-length 01 underneath. Look at the Language Reference and Programming Guide, come back, with full details and information about what you have tried and what problem remains, if you still need to.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue May 21, 2013 3:24 pm
Reply with quote

A (pre)caution when working with ISAM: Enterprise COBOL does not support the processing of ISAM files, nor does z/OS V1.7 and later releases. You must convert ISAM files to VSAM/KSDS files before you move to z/OS V1.7 or later.

So what release of COBOL and zOS are you at?
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 21, 2013 9:42 pm
Reply with quote

Hello,

Check on your definition of the output file.

In order to get a variable file, you must program for this. Your RECORD CONTAINS is not enough.

The 2 most common ways (that i know of) is to have multiple Level 01 statements withing the FD of different lengths and/or an 01 that contains one or more OCCURS DEPENDING ON statements.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Error when install DB2 DB2 2
Search our Forums:

Back to Top