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: 10274
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Mainframe Opening in Chennai ( 2 to 4... muralikrishnan_new Mainframe Jobs 0 Tue Jul 18, 2017 2:20 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm


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