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

FD Section to Create FB or Vb File Dynamically


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

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Jun 24, 2022 10:23 am
Reply with quote

Hi All,

I have searched it in the forum and internet but did notget an answer which suffice my purpose .Below is my requirement.. PLease assist

I have a cobol program where I am passing the parm as FB or VB .. Based on this parameter I need to create the file either fixed length or variable length ,, I need the FD section definition for this .. IN JCL I am achiving this by parameters passed and use of symbloics but In COBOL I am not able to get what My FD section look like .. Please Guide .. Thanks in Advance.


Regards
Sumit
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8661
Location: Dubuque, Iowa, USA

PostPosted: Sat Jun 25, 2022 12:51 am
Reply with quote

A COBOL file is either fixed length (FB) or variable length (VB). This attribute is determined at compile time and CANNOT be changed while the program is executing. You can use BPXWDYN to dynamically allocate a file in COBOL, but you need to give COBOL the FD to use with it -- and that FD must be fixed or variable length. The only way to change the FD is to edit the source and then recompile the program.
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 File Aid Batch IBM Tools 7
No new posts To replace jobname in a file with ano... SYNCSORT 12
No new posts Converting fixed length file to excel... IBM Tools 7
No new posts Extract record using 2 input file int... JCL & VSAM 2
No new posts I want to append a record in an exist... CLIST & REXX 17
Search our Forums:

Back to Top