- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - OpenVMS
- >
- Re: Vax-VMS (Cobol) listings and PC Software comp...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 04:58 PM
06-15-2005 04:58 PM
Vax-VMS (Cobol) listings and PC Software compatibility
any query will be wellcomed
Inam shah
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 06:18 PM
06-15-2005 06:18 PM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
The problem is in the COBOL report file format. COBOL uses the VFC, 2 byte header file format. The number of blank lines before and after the line are in a 2 byte header, which is not interpreted by ftp and other communication software.
So as the first thing try to compile yours programs with COBOL/NOVFC. This instructs COBOL to create stream_lf reports instead of VFC reports.
The second option is to write a small program in C, which converts the VFC file in stream_lf file.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2005 06:47 PM
06-15-2005 06:47 PM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
You can also mail the file to the PC user.
Wim
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 01:53 AM
06-16-2005 01:53 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
I tryed with M$ Word and it works.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 01:55 AM
06-16-2005 01:55 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
Notepad can't works.
Antonio Vigliotti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2005 07:22 PM
06-16-2005 07:22 PM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-17-2005 01:04 AM
06-17-2005 01:04 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
no need to write a program - use the CONVERT command.
Purely Personal Opinion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2005 10:31 PM
06-18-2005 10:31 PM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
>language.
>COBOL/NOVFC. This instructs COBOL to create >stream_lf reports instead of VFC reports.
COBOL/NOVFC is an option we added on Alpha
and I64 but not on VAX.
Don Braffitt
project leader, HP COBOL/SORT for OpenVMS
and Tru64 UNIX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 01:52 AM
06-19-2005 01:52 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
I forgot that on VAX there is no /VFC option on VAX.
Ian,
Yes CONVERT can do the job. But how you instruct convert to add blank lines and form feeds to the output? As I know CONVERT will lose all printing information and if you convert a file like:
line 1
line 3
line 6
you will receive a file:
line 1
line 3
line 6
Now I cant test, but a C program like this:
#include
int main(int argc,char ** argv)
{
FILE * inf, *outf;
char buf[1024];
inf = fopen(argv[1],"r");
outf = fopen(argv[2],"w");
for (;;)
{
if (fgets(buf,1024,inf))
fputs(buf,outf);
else
break;
}
fclose (inf);
fclose (outf);
}
will do the work. (the program has no tests and is only an example! Add all tests). For a VAX I am not shure that this works but on an Alpha it works because the C runtime reads the fixed header of the record and interpret the contents. So you receive all the line feeds from the interpreatation of the fixed header.
If this does not work on an VAX you must write a program which will read the file with RMS routines and interpret the fixed header of each record.
Bojan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 04:02 AM
06-19-2005 04:02 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
The following two commands may solve your problem, if the PC application can handle form-feeds, and you transfer in ascii mode.
$ excha/net/tran=conv=carr old new
$ set file/attri=(rfm=stmcr,rat=none) new
You may want to check out other EXCHANGE/NET options.
FOr example, it can take an FDL and can make those VFC characters become data characters.
Besides writing a real RMS program (with RABs givign access to RAB$L_RHB) to read teh data raw you can also use CONVERT/FIXED
or... you can just whack the file into submission:
$ set file/attri=(rfm=var,rat=none)
You would then still need something to interpret those 2 byte headers.
The attached file contains some 'treasures' from the digital archives from aroudn 1990.
The first progrma is VAX only CObol solution as it exploits a sneaky way to get a RAB addresss.
The next text in that attachement is an (untested by me) TPU solution with extensive documentation and explanations on these PRN files.
Hope this helps,
Hein.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2005 04:31 AM
06-19-2005 04:31 AM
Re: Vax-VMS (Cobol) listings and PC Software compatibility
I took my own advice and adapted the convert-vfc.cob program from the prior reply to expect the vfc data as the leading two characters in the records.
Attached an other text file with
- a test program for several PRN/VFC formats
- the adapted program with the VAX dependency removed.
It works... mostly. It does not handle a simple space 1 before print. Still, it should be a useful starting point for anyone needing this. If anyone is really stumpted by this and really needs it tweaked, then i may try to help with that, but not untill the need is proven.
Hope this helps someone out there,
Hein.