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: 8696
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 Compare 2 files and retrive records f... DFSORT/ICETOOL 2
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top