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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

assigning clause 1

Status
Not open for further replies.

D2BEA

Technical User
Mar 13, 2001
41
US
Is there a way when defining the "assign to" clause that I can have the data sent both to the printer and a file without having to recode?
 
Hi,

I guess it depends on the environment you are working.

If you are on the mainframe, you can copy the dataset and print it in a separate job.

If you are on the pc and your data does not contain special things, you can also do a copy to the printer.

In UNIX environments it should be possible to duplicate a file to several destinations automaticaly. But I am not a UNIX guy.

I hope this is helpful.

Regards,

Crox
 
I want one file to go to the printer and other to a file and I do not want to recode, is there a way to send to two areas is the assing clause?
select filename
assign to printer
assign to \data\forms\datafile

using this does not seem to work.
 
The two ASSIGN's will not work. Your only hope is to ASSIGN the file to a regular disk file and use a system print utility to copy it to the printer. Betty Scherber
Brainbench MVP for COBOL II
 
D,

again depending on your platform, if you have access to JCL, you can easily copy your one output file and send it to a printer. How this looks depends on your environment.

Good luck !
 
One solution there might define a seperate file, and then put in a WRITE command which copies the entire disk output file to a seperate printer output file... Will allow you to do what you desire within the code itself instead of relaying on a printer utility Chris Green
Computer Information Systems Student
Cayuga Community College -- Fulton
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top