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

How to capture the LENGTH of the Variable file record


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

New User


Joined: 26 Jul 2008
Posts: 15
Location: Jefferson city, MO, USA

PostPosted: Sun Apr 04, 2010 12:42 am
Reply with quote

We are getting S0C7 error for the following statement

MOVE LENGTH OF 01-FILE-RECORD TO 01-FILE-LENGTH.

Here 01-FILE-RECORD is a variable file record and 01-FILE-LENGHT is declared as S9(04) COMP.

FYI, for fixed length file records we have no issues.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Apr 04, 2010 12:56 am
Reply with quote

Quote:
01-FILE-LENGHT is declared as S9(04) COMP.


how is 01-FILE-LENGTH defined?

is 01-FILE-RECORD part of the FD section?
if so, has the file been opened?

has 01-FILE-RECORD been initialized or populated?
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sun Apr 04, 2010 1:08 am
Reply with quote

www.ibmmainframes.com/viewtopic.php?p=127660&highlight=#127660

In the above post, after a READ, WS field WS-RECORD-LGTH will contain the actual length of the record.

Bill
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: Sun Apr 04, 2010 2:45 am
Reply with quote

Hello,

Quote:
MOVE LENGTH OF 01-FILE-RECORD TO 01-FILE-LENGTH.
Suggest you post the SELECT, the FD, the working-storage field and what you believe is the problem MOVE.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Apr 04, 2010 5:32 am
Reply with quote

also the OPEN statement.

it appears from the code snipet, the TS is attempting to write variable len records.

Quote:
FYI, for fixed length file records we have no issues.


what does that mean?
are you attempting to use a length for fixed length records
or
what?

Why are you moving a LENGTH of Reference name?

again, what are you trying to do?
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Store the data for fixed length COBOL Programming 1
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 PARSE Syntax for not fix length word ... JCL & VSAM 7
Search our Forums:

Back to Top