Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Opening a dynamic file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Opening a dynamic file
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    Post subject:
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    Post subject:
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    Post subject:
Reply with quote

Hi all,

Any pointers?


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

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Tue Mar 04, 2008 11:37 pm    Post subject: Reply to: Opening a dynamic file
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Issue with NDM process to transmit ES... chetanambi All Other Mainframe Topics 6 Wed May 03, 2017 10:52 am
No new posts File processing vishwakotin Mainframe Interview Questions 9 Fri Apr 28, 2017 11:38 am
No new posts Occurrence of various strings within ... TS70363 JCL & VSAM 1 Thu Apr 27, 2017 8:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us