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
 

 

Writing a Variable record dataset

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
k_vikram07

New User


Joined: 23 Nov 2005
Posts: 35

PostPosted: Mon Mar 20, 2006 12:23 pm    Post subject: Writing a Variable record dataset
Reply with quote

Hi,

I have a requirement that I am working on. I am new to COBOL(was workig on PL1). But searched most of the documentation for this. Please help.

I have a VB file of max reclength of 8000.
The record format is decided based on common datapart of 40 bytes in the record. There are around 10 layouts based on a field in the common part.

Now, I just have to modify another field in the common part for all records and write to another VB file. I don't want to use the 10 layouts in the declarations, because I'm not concerned with the record type. (actually I've to find the actual layouts now for this.)

When I wrote this program all the records are written with max lrecl.

Is there any clause or verb that can define the record length for variable record. Please help.
Back to top
View user's profile Send private message

thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Mon Mar 20, 2006 2:10 pm    Post subject:
Reply with quote

hi k_vikram07,


you can declare all the format's of record layout in your file control section.

firt write one record lay out,

ex ample:

01 format1-------your first record formate


01 formate2------------your second formate


like that you can declare all the formate's.In file section automatic redefines's is work's.

Thank's
thanooz.
Back to top
View user's profile Send private message
thanooz

New User


Joined: 28 Jun 2005
Posts: 99

PostPosted: Mon Mar 20, 2006 2:15 pm    Post subject:
Reply with quote

hi k_vikram07,


soryy in above replay,

i had mentioned file controle section instead of that file section in data division you have to write all the record formates one by one.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 288
Location: Basel, Switzerland

PostPosted: Mon Mar 20, 2006 4:56 pm    Post subject:
Reply with quote

hy k_vikram07,

you should have the two first bytes in your structure
declared as a length field for yout output file --> S9(04) COMP.
therefore your structure will be 8002 bytes.
but also don't forget to tell in your jcl,
that your output file is RECFM=VB with
the LRECL required as 8002 bytes...
you need this only for output.
note: RECORDING MODE IS V in your FD section...

martin9
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 Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
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


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