MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Dynamic allocation of input and output files in COBOL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
jmccuistion
Beginner


Joined: 26 Oct 2005
Posts: 2
Topics: 1

PostPosted: Wed Oct 26, 2005 7:58 am    Post subject: Dynamic allocation of input and output files in COBOL Reply with quote

I am creating a progam that will move data around based on input and output FILEAID created copybook files (positional moves) and I need to dynamically allocate both input and output files. the kicker is that these input/output files will be different lengths based on the fileaid file that is being used. Is there a way of getting around the FD statements need for a Length? I can Identify the files and there lengths in a parm

is there anybody out there that can point me in the right direction or if this is doable at all
Back to top
View user's profile Send private message
vkphani
Intermediate


Joined: 05 Sep 2003
Posts: 483
Topics: 48

PostPosted: Wed Oct 26, 2005 8:04 am    Post subject: Reply with quote

Pls go thru the following links:

http://mvsforums.com/helpboards/viewtopic.php?t=2631&highlight=allocate+files+dynamically

http://mvsforums.com/helpboards/viewtopic.php?t=2520&highlight=allocate+files+dynamically

http://www.naspa.com/PDF/2001/1201%20PDF/T0112005.pdf


Last edited by vkphani on Wed Oct 26, 2005 8:19 am; edited 2 times in total
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12401
Topics: 75
Location: San Jose

PostPosted: Wed Oct 26, 2005 8:06 am    Post subject: Reply with quote

jmccuistion,

Well the dynamic allocation part is easy. you can do it using BPXWDYN. check these links

http://www.mvsforums.com/helpboards/viewtopic.php?t=4572&highlight=bpxwdyn

http://www.mvsforums.com/helpboards/viewtopic.php?t=4494&highlight=bpxwdyn

http://www.mvsforums.com/helpboards/viewtopic.php?t=2631&highlight=bpxwdyn


However COBOL cannot handle Dynamic FD statements. So you can either define all the possible FD statements or use 1 FD with defining the max length and as a VB file.

Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
jmccuistion
Beginner


Joined: 26 Oct 2005
Posts: 2
Topics: 1

PostPosted: Wed Oct 26, 2005 10:28 am    Post subject: Reply with quote

all,

thanks for the information, but will not help me as each of the input files are set in length and can not change the LRECL to VB. it will defeat the purpose of the program. Oh well thanks again.

jmccuistion
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Mon Oct 31, 2005 3:19 am    Post subject: Reply with quote

jmccuistion,

Are you looking only for a COBOL solution ? Can't this be done using any other utiities like SORT / EASYTREIVE or a combination of COBOL along with other utilities. If you can give us a detailed description of what you are trying to accomplish, probably we could suggest some other techniques.

Remember, both DFSORT and Syncsort (latest version) have a facility to refer variables as Symbolic names. You can convert, a fileaid copybook layout to these symbolics and use them. For more details on this search for SYMNAMES in the utillities thread. You will see lots of examples.

Thanks,
Phantom
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group