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 Jes2 command output All Other Mainframe Topics 4
No new posts Selecting the max value from a file. DFSORT/ICETOOL 3
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts Change history of vsam file. JCL & VSAM 3
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
Search our Forums:

Back to Top