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: 8700
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 Unable to interpret a hex value to De... COBOL Programming 4
No new posts how to eliminate null indicator value... DB2 7
No new posts How can I add/create a new INIT(initi... TSO/ISPF 2
No new posts Dynamically build sort control statem... SYNCSORT 18
No new posts Format Binary file to EBCDIC JCL & VSAM 4
Search our Forums:

Back to Top