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

Dynamically read input files using BPXWDYN


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

Active Member


Joined: 01 Sep 2015
Posts: 712
Location: Denmark

PostPosted: Tue Sep 08, 2020 7:29 pm
Reply with quote

Actually you can use a single BPXWDYN command:
cc=BpxWdyn('alloc da(what.ever) shr rtddn(ddn)')
will return the generated ddname in var 'ddn' if cc=0.
Then you can reuse that ddname i.e.
cc=BpxWdyn('alloc da(what.ever.b) shr dd('ddn') reuse')
Back to top
View user's profile Send private message
jasorn
Warnings : 1

Active User


Joined: 12 Jul 2006
Posts: 191
Location: USA

PostPosted: Mon Nov 29, 2021 1:29 am
Reply with quote

It's been a while and I don't have access to the program at the moment. But I've done this before. Make sure you check the RC of bpxwdyn. You can free the ddname and reuse or use another if you want.

If I remember correctly, the process we had ran frequently so we didn't mind if a dataset was skipped until the next run.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2018
Location: USA

PostPosted: Wed Dec 01, 2021 1:06 am
Reply with quote

Using such things as dynamic dataset allocation is not needed in 99% of the cases where it has appeared. Especially when the author of this solution does not understand the fundumentals of dataset maintenance under zOS. This approach may demonstrate a pseudo-expert level of the developer to his manager (who in turn has not a minor idea about such issues).

In zOS the same things almost always can be implemented in a simple way, without any sophisticated operations.
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Wed Dec 01, 2021 6:38 am
Reply with quote

Please start a new topic in future.
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 Error to read log with rexx CLIST & REXX 11
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top