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
 

 

How to capture the LENGTH of the Variable file record

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: How to capture the LENGTH of the Variable file record
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: 6967
Location: porcelain throne

PostPosted: Sun Apr 04, 2010 12:56 am    Post subject:
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: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sun Apr 04, 2010 1:08 am    Post subject: Reply to: How to capture the LENGTH of the Variable file rec
Reply with quote

http://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

Site Director


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

PostPosted: Sun Apr 04, 2010 2:45 am    Post subject:
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: 6967
Location: porcelain throne

PostPosted: Sun Apr 04, 2010 5:32 am    Post subject:
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am


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