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

COBOL - create and write to output file(s) using BPXWDYN


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

New User


Joined: 21 Sep 2022
Posts: 1
Location: USA

PostPosted: Wed Sep 21, 2022 3:34 am
Reply with quote

Hi ! I have a COBOL program in which I NEED to dynamically ALLOCATE aor new output file, write to it, then close it and FREE it. Then I will allocate another file to the same DD and repeat the process as many times as needed.

I don't know how many output files (all having the same DCB and SPACE parameters) I will need, hence the need for dynamic allocation. The mechanism I need to use is the BPXWDYN (or BPXWDY2 program shipped by IBM.

I have seen many dynamic allocation examples for input files, and several purportedly valid examples of BPXWDYN/DY2 call strings for output files. Unfortunately none of the output examples have worked.

This is really not some exotic or outlandish requirement -- every modern language provides this facility. I know BPXWDYN/DY2 does -- I just cannot get it to work.

Could someone PLEASE post a -- working -- COBOL call to BPXW*** allocating an output file with DCB and SPACE and PS parms, and the JCL DD statement to go with it ? HUGELY appreciate it ??? Thanks all for your attention to this
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 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
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
Search our Forums:

Back to Top