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

Opening a dynamic file


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

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Tue Mar 04, 2008 7:30 pm
Reply with quote

Hi all,

I have an experiment in hand. I have a list of files with the same record structure which I need to open and perform the same task with.

My idea of going about this is as below:
1) Have an input parameter file that contains file locations along with file name. The record structure will be an X(80) and will contain data per row as:
c:\My Data\newfile.dat
d:\My Data\newfile2.dat

2) Open the input file within my program, read first record, open the file mentioned and start my processing.

My query is regarding the mapping from Logical to physical file name as I am aiming that to be dynamic. Can I achieve this dynamicism in my program? Any other suggestion ? I would like my input paramter file to be dynamic?
Back to top
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Mar 04, 2008 7:53 pm
Reply with quote

In which programming languauge you are experimenting.
Are you using PC or Unix COBOL or Mainframe COBOL?
Back to top
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Tue Mar 04, 2008 8:49 pm
Reply with quote

Hi Devzee,

It is basically VMS cobol. It is fairly similar to mainframe cobol. Moreover we're working on flat files, if that is of relevance :-)
Back to top
View user's profile Send private message
arien

New User


Joined: 02 Nov 2006
Posts: 43
Location: London

PostPosted: Tue Mar 04, 2008 9:51 pm
Reply with quote

Hi all,

Any pointers?


Cheers,
arien icon_lol.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Mar 04, 2008 11:37 pm
Reply with quote

a search on "VMS COBOL"
pointed to the HP(R) VMS cobol main documentation page
http://h71000.www7.hp.com/doc/cobol.html
and from here to the HP cobol reference manual
http://h71000.www7.hp.com/doc/82final/6296/6296pro.html

You could have done it Yourself with very little effort

and looking at the fd section guess it looks like the value of id clause might satisfy Your need
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 FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top