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 Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts Random read in ESDS file by using RBA JCL & VSAM 6
No new posts Changeman - how can we know the curr... Compuware & Other Tools 2
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top