Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using C$COPY in Acucobol.

Status
Not open for further replies.

HaydenClark

Programmer
Oct 10, 2006
7
ZA
Hi.

We are creating a line sequential file on our VMS machine and then using Acucobol to copy the file into the windows world where it will perform some magic and create other files.

The problem that we are sitting with is that the file appears perfect on VMS but after Acucobol completes the initial copy to the windows directory then the file is "corrupted" because the copy function has inserted what looks like <tab>'s into the records.

We can't find any help on this so any ideas why this is happening or tips to resolve the problem would be appreciated.

Thanks.

"Of all the things I've lost I miss my mind the most.
 
Are the output records LINE SEQUENTIAL or RECORD [BINARY] SEQUENTIAL?

LINE SEQUENTIAL records can have tabs inserted into them, there is an option to turn that feature off. Tom Morrison can tell you how to do it.
 
Hi Webrabbit.

The records are written out as line sequential. I have tried searching through the compile options to see if I could become wiser and find a solution that way but have found nothing yet.

Is Tom Morrison on this forum?

Thanks.
Hayden

"Of all the things I've lost I miss my mind the most.
 
It might be an alpha switch setting, or may require a library call.

Tom Morrison is a vendor rep for Micro Focus and he watches this forum.

I believe Micro Focus has purchased AcuCOBOL, but am not 100% certain.
 
MF has indeed bought AcuCOBOL a few years ago. with Acu there are switches you can use to deal with tabs on files. and one of their utilities can also be used to view and convert the files to a diff format if required

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
So far, no luck with getting this resolved. I have discovered that the excel files that we create which are then copied back to the VMS server are also corrupted and cannot be opened properly in excel afterwards. So it would seem that the problem extend beyond that of the simple sequential files.

Anybody have any advise?

Thanks.
Hayden.

"Of all the things I've lost I miss my mind the most.
 
Can you tell whether the tabs are replacing a number of spaces, or are they simply inserted?
 
C$COPY does not do much processing really should not do much processing. usage is as follows, and only thing that makes a bit of difference is FILE-TYPE.
CALL "C$COPY"
USING SOURCE-FILE, DEST-FILE, FILE-TYPE,
GIVING COPY-STATUS

HOWEVER.... if you are using ACUSERVER on your vms machine (and I suspect you are) then there are issues associated with it and you just bumped on one of them.

Can you tell us which program you are using on VMS to create the file, and if it is a AcuCOBOL program can you give us the SELECT and FD of that file. also can you tell us what are the OS file attributes on the VMS side.


And to rule out something can you create a file with just 2 or 3 records (sample file with NO sensitive data but with same record layout) and then
1 - ftp that file out of VMS using BINARY MODE
treat this as file sample1
2 - using ftp with normal conversion
treat this as file sample2
3 - "download" file using the C$COPY option "S" as filetype
treat this as file sample3
4 - "download" file using the C$COPY option "R" as filetype
treat this as file sample4

and send all 4 files to frederico_fonseca at domain below for me to have a look

Also send the configuration file you are using with both your program on the windows machine and the acuserver on the vms machine if you are indeed using acuserver.
also would like to know which versions you are using of both compiler, runtime and acuserver

Regards

Frederico Fonseca
SysSoft Integrated Ltd

FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top