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: 10211
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts REXX DB2: Dynamic allocation of DB2.D... BHAS CLIST & REXX 3 Mon Dec 19, 2016 8:26 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
This topic is locked: you cannot edit posts or make replies. Natural ADABAS Opening with CTS enikhilk Mainframe Jobs 0 Wed Nov 30, 2016 5:37 pm


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