PDA

View Full Version : format variable?



Guest.Visitor
01-01-1995, 02:00 AM
Is it possible to get and print a format dynamically? What I am trying to do is this: a) I have a generic print file and program (so far so good) b) I pass into the program the vendor number c) I would like to be able to take that vendor number (01234) and combine it with a character (say a 'V') and that would be the format name for the cover sheet. I don't want to use the coverpage utility because I only want one copy of the coverpage and I need three copies of the report. Plus the cover page will be different for each vendor. Any ideas? 'I love deadlines. I especially like the whooshing sound they make as they go flying by.' - Dilbert

Guest.Visitor
03-23-1999, 10:27 AM
On Friday, March 19, 1999, 09:11 AM, Jo Ann Burelle wrote: Is it possible to get and print a format dynamically? What I am trying to do is this: a) I have a generic print file and program (so far so good) b) I pass into the program the vendor number c) I would like to be able to take that vendor number (01234) and combine it with a character (say a 'V') and that would be the format name for the cover sheet. I don't want to use the coverpage utility because I only want one copy of the coverpage and I need three copies of the report. Plus the cover page will be different for each vendor. Any ideas? 'I love deadlines. I especially like the whooshing sound they make as they go flying by.' - Dilbert Jo Anne, If you want to print a format from an externally defined print file, you will have to have a program or module that knows the format. You can call that program or procedure dynamically. Another alternative would be to store your printed information in a file/? by vendor and write a generic routine to print that information based on the vendor key. Depending on your needs (AFP/No APF, etc) that routine could be implemented in a variety of ways. Based on your copies statement I assume you don't want to share the print file. In this case the simplest may be to create a procedure that uses an internal print file with a print control structure that receives a print string and space/skip info. David Morris

Guest.Visitor
03-24-1999, 02:52 AM
On Tuesday, March 23, 1999, 11:27 AM, David Morris wrote: Jo Anne, If you want to print a format from an externally defined print file, you will have to have a program or module that knows the format. You can call that program or procedure dynamically. Another alternative would be to store your printed information in a file/? by vendor and write a generic routine to print that information based on the vendor key..... This was my other 'idea'. We have something similiar to this in our report distribution system. We use 80 character fields in a database file to create a cover page. Here's another thought... I seem to remember articles about printing from CL, is it possible to read a file and print fields? Then I could create a CL to read the database file and print the fields keyed by the vendor number I pass in. Am I trying to make this too slick? 'I love deadlines. I especially like the whooshing sound they make as they go flying by.' - Dilbert

T.Holt
03-24-1999, 04:29 AM
Jo Ann, the original QUSRTOOL had a PRINT command that would print from CL programs. I assume it's now in TAATOOL. I also published a similar print command in my book Power CL. If you want to pursue this, <a > href="mailto:holt@midrangecomputing.com">email me</a>, and I'll send you the code.<HR> <font color=blue> On Wednesday, March 24, 1999, 03:52 AM, Jo Ann Burelle wrote: Here's another thought... I seem to remember articles about printing from CL, is it possible to read a file and print fields? Then I could create a CL to read the database file and print the fields keyed by the vendor number I pass in. </font>