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

variable record lengh in cobol & Jcl


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhaskarkdp

New User


Joined: 18 Aug 2008
Posts: 2
Location: bangalore

PostPosted: Tue Aug 19, 2008 3:14 pm
Reply with quote

Hi,

cobol file having varibale length 200, how to declare this file in FD(lable records...) and in 01 rec1 and in JCL (in DCB) ?

Thanks,
Bachi
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Aug 19, 2008 3:21 pm
Reply with quote

Take a look at the manual for the JCL part

Click HERE to read the manual
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Aug 19, 2008 3:25 pm
Reply with quote

Have your tried anything?
what is the error you are getting?
if yes post the error and code..
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 Aug 19, 2008 3:39 pm
Reply with quote

Hi,
bhaskarkdp wrote:
cobol file having varibale length 200, how to declare this file in FD(lable records...) and in 01 rec1 and in JCL (in DCB) ?
Something like -
Code:
FD  IN-FILE         
    RECORDING MODE V           
    LABEL RECORDS ARE STANDARD
    BLOCK CONTAINS 0 RECORDS. 
where IN-FILE is input file.

And in this
Quote:
cobol file having varibale length 200
Does "200" includes RDW ? If yes, then in DCB LRECL would be 200 else 204 (added 4 for RDW). You can search for DCB in the link posted by Expat, it has some examples as well & better explanations..

Hope this helps...
Back to top
View user's profile Send private message
bhaskarkdp

New User


Joined: 18 Aug 2008
Posts: 2
Location: bangalore

PostPosted: Tue Aug 19, 2008 4:00 pm
Reply with quote

bhaskarkdp wrote:
Hi,

cobol file having varibale length 200, how to declare this file in FD(lable records...) and in 01 rec1 and in JCL (in DCB) ?

Thanks,
Bachi



I have seen in some books like

FD infile
recording mode is V
record is varying in size from <starting> to <ending>
depending on <some varibale>

what it means? In my requirement variable length record is 200. Please let me know how to code in FD.

Thanks,
Bhaskar
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 Aug 19, 2008 4:33 pm
Reply with quote

Hi,
bhaskarkdp wrote:
I have seen in some books like
Probably they were for AS400..
Quote:
what it means? In my requirement variable length record is 200. Please let me know how to code in FD.
Please check this link -

publib.boulder.ibm.com/infocenter/iadthelp/v7r0/index.jsp?topic=/com.ibm.etools.iseries.pgmgd.doc/c0925405409.htm

It should give you a start..
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 Aug 19, 2008 9:57 pm
Reply with quote

Hello Bachi and welcome to the forums,

If your record length is 200 only, why is this defined as a variable length file?

The first order of business is to determine if you have variable length or fixed length data. What are the attributes shown if you use tso/ispf 3.4 and display the information about the file? If you post what is shown for these attributes, it will help us help you:
Code:
Organization  . . . : PS   
Record format . . . : FB   
Record length . . . : 80   
Block size  . . . . : 27920
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top