Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Error in file handling

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Error in file handling
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

Moderator


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

PostPosted: Tue May 21, 2013 1:33 pm    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7255

PostPosted: Tue May 21, 2013 1:47 pm    Post subject: Reply to: Error in file handling
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

Senior Member


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

PostPosted: Tue May 21, 2013 3:24 pm    Post subject:
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

Site Director


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

PostPosted: Tue May 21, 2013 9:42 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us