Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Dynamically change the record length of a sequential file

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

New User


Joined: 21 Mar 2007
Posts: 6
Location: chennai

PostPosted: Thu Apr 26, 2007 4:50 pm    Post subject: Dynamically change the record length of a sequential file
Reply with quote

Hi All,

Is it possible to dynamically change the record length of a sequential file and revert back to the same record length? I can elaborate my question a little bit..

Suppose i create a sequential file with record length 50.Now I want to insert a new field.Now my question is "Is it possible to extend the record length when i want 2 insert a field and switch back to the same record length(ie 50) if i dont want to insert a field?"

Thanks and regards,
Naga.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10326
Location: italy

PostPosted: Thu Apr 26, 2007 4:55 pm    Post subject: Re: IS IT POSSIBLE TO CHANGE THE RECORD LENGTH OF A SEQ FILE
Reply with quote

If You need this kind of dynamic behavior it would be better to use variable length records

Anyway Yo cannot do that "in place" on datasets with fixed length records

regards

e.s
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Apr 26, 2007 5:28 pm    Post subject: Re: IS IT POSSIBLE TO CHANGE THE RECORD LENGTH OF A SEQ FILE
Reply with quote

nagarajan_guru wrote:
"Is it possible to extend the record length when i want 2 insert a field and switch back to the same record length(ie 50) if i dont want to insert a field?"
Absolutely, no problem, that's what they invented "Variable" record format for.
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: Thu Apr 26, 2007 10:12 pm    Post subject:
Reply with quote

Hello,

As has been posted - yes you can.

Any program that is going to read the file will need to know which record format it has read (often accomplished by using a "record code" that is put in the record).

You might want to post some of your data and how you want things to work for your situation - the "switch back" may present some "opportunities" depending on just how this is defined. If you can show some original records and then what will happen with them, it will be more clear.
Back to top
View user's profile Send private message
jasorn

Active User


Joined: 12 Jul 2006
Posts: 154
Location: USA

PostPosted: Wed May 09, 2007 7:17 am    Post subject:
Reply with quote

You can also do this kind of thing with fixed width datasets. The shorter records just get a filler. For me, the method I choose depends on the situation.
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 Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us