A SYSTEM AND METHOD FOR MODIFYING OUTPUT OF A COMPUTER PROGRAM WITHOUT SOURCE CODE MODIFICATIONS

Abstract: A system and method for modifying the output of a computer program without source code modification. A computer program reads in two files, an input data file and a recipe text file. The data input file contains name/value pairs to be rendered to an output device and the recipe text file contains the formatting descriptions. The name/value pairs of the data input file need not be arranged according to a required structure. During the execution of the program, the formatting descriptions of the recipe text file are converted into a sequence of executable objects and the name/value pairs from the data input file are rendered in a format according to these formatting descriptions. A coordinated alteration of the input text file and the recipe text file will result in a modification to the output format.

Description: A SYSTEM AND METHOD FOR MODIFYING OUTPUT OF A COMPUTER PROGRAM WITHOUT SOURCE CODE MODIFICATIONS FIELD OF THE INVENTION The present invention generally relates to computer output formatting systems, and more particularly relates to a method and system for modifying the format of the output of a computer program without modifying the source code of the computer program. BACKGROUND OF THE INVENTION Users of computer systems from time to time need programs that perform new processes that are variations of the processes performed presently. Therefore, the computer programs employed by the user require maintenance or modification to the processes they implement. Many times the necessary modifications include changes to the way the program output if formatted. Generally in the past, the output of a computer program was determined by the source code itself. Due to this, when output formats in derivation from those originally written into the program were desired, it was necessary to employ highly skilled computer programmers to make modifications to the source code of the computer program itself. As a result, when the output format of a computer program required modification, long costly delays were experienced. For example, consider a program for making labels. Initially, during the use of the program, the location, font, letter size, and orientation of objects are acceptable. However, during the life of the program it becomes necessary to alter the format in some way to meet a new or unexpected need. To meet this need, a highly skilled computer programmer would have to reprogram the source code of the computer program causing expenditures of both time and money. Accordingly, there remains a need in the art to reduce the amount of time and programming skill level necessary to change the output format of a computer program. SUMMARY OF THE INVENTION The present invention seeks to provide a way to make modifications to computer program output formats without making costly and time consuming changes to the program's source code. This object is accomplished by providing the program with a multitude of readily modifiable formatting descriptions through a separate input text file. When a change is desired in the output format, rather than changing the source code of the program, the content of this text file is modified. Since this is an input text file and not source code, only the knowledge of the file's simple syntax rules is necessary and not the ability to create complex computer program source code. Therefore, great efficiencies are created by modifying the output format of a computer program without costly and time-consuming code level modifications. In a preferred embodiment, the computer program reads two files, an input data file and a recipe text file. The data input file contains name/value pairs to be rendered to an output device and the recipe text file contains the formatting descriptions. The name/value pairs of the data input file need not be arranged according to a required structure. During the execution of the program, the formatting descriptions of the recipe text file are converted into a sequence of executable objects and the name/value pairs from the data input file are rendered in a format according to these formatting descriptions. A coordinated alteration of the input text file and the recipe text file will result in a modification to the output format. Another aspect of the invention is a method for outputting formatted information. The method provides an input data text file containing name/value pairs; provides a recipe text file containing formatting descriptions; converts the recipe text file into a sequence of executable objects; receives a request to render output; and executes the executable objects to render the name/value pairs according to the formatting descriptions. Next, the method modifies the recipe text file to include modified formatting descriptions; converts the modified recipe text file into a sequence of executable objects; receives another request to render the output; and executes the executable objects to render the name/value pairs according to the modified formatting descriptions. The input data text file may be modified to include modifi d name/value pairs corresponding to the recipe text file modification. For example, again consider a program for making labels. As before, during the initial use of the program, the location, font, letter size, and orientation of objects are acceptable, but during the life of the program it becomes necessary to alter the format in some way to meet a new or unexpected need. To meet this need, however, a highly skilled computer programmer will not have to reprogram the source code of the computer program. Rather than modifying the source code of the program, a simple addition to or modification of the recipe text file can be made using only the knowledge of the recipe text file syntax. Since the formatting descriptions of the recipe text file are converted by the program into a sequence of executable objects, no source code modification is necessary. Therefore, the ability to program in a highly technical computer programming language is not required. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a functional block diagram of an exemplary operating environment for implementation of the exemplary embodiments of the present invention; Fig. 2 is a flow chart that illustrates the general operation of an exemplary embodiment of the present invention; Fig. 3 is an illustration of the name/value pairs contained in the input data text file; and Fig. 4 is an illustration of a recipe text file. DETAILED DESCRIPTION OF AN EXEMPLARY EMBODIMENT The present invention is directed to a system and method for modifying the output of a computer program without source code modification. Briefly described, the invention provides an input data file containing input data and a recipe text file containing format descriptions, to a computer. Once these files are read by the computer, the recipe file is converted to a sequence of executable objects. After a request is received by the computer from a user, the executable objects are executed to render the data from the data input file in accordance with the formats contained in the recipe text file. After the output has been rendered accordance with the formats contained in the recipe text file, the recipe text file is modified to reflect a desired change in the output format. Once this has been accomplished the system converts the recipe text file into executable objects and again executes them in response to user input. The result of this execution is the output of the data from the data text file in a format modified from the previous execution. The description of the exemplary embodiment of the present invention will hereinafter refer to the drawing, in which like numerals indicate like elements throughout the several figures. Beginning with Fig. 1, an exemplary operating environment for implementation of an exemplary embodiment of the present invention is shown. Within the exemplary operating environment, the present invention may operate to facilitate the modification of the output of a computer program without source code modification. However, those skilled in the art should appreciate that the invention may be practiced in any type of computer operating environment such as hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices. The exemplary embodiment of the present invention will be described in the general context of a format output sub-system application program 36 hereafter referred to as the FOSS application program. The FOSS application program 36 facilitates the modification of the output of a computer program, interacts with an input data text file 38 and a recipe text file 39, in order to modify the output of a computer program without source code modification. Those skilled in the art will recognize that the invention may be implemented in combination with various other program modules 37. Generally, program modules include routines, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with computer system configurations other than the one shown, that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices. An exemplary operating environment 100 for implementing the invention includes a conventional personal computer system 20, including a processing unit 21, a system memory 22, and a system bus 23 that couples the system memory 22 to the processing unit 21. The system memory 22 includes read only memory (ROM) 24 and random access memory (RAM) 25. A basic input/output system 26 (BIOS), containing the basic routines that help to transfer information between elements within the personal computer system 20, such as during start-up, is stored in ROM 124. The personal computer system 20 further includes a hard disk drive 27, a magnetic disk drive 28, e.g., to read from or write to a removable disk 29, and an optical disk drive 30, e.g., for reading a CD-ROM disk 31 or to read from or write to other optical media. The hard disk drive 27, magnetic disk drive 28, and optical disk drive 30 are connected to the system bus 23 by a hard disk drive interface 32, a magnetic disk drive interface 33, and an optical drive interface 34, respectively. The drives and their associated computer-readable media provide nonvolatile storage for the personal computer system 20. For example, the input data text file 38 may be stored in the RAM 25 of hard disk 27 of the personal computer 20. Although the description of computer-readable media above refers to a hard disk, a removable magnetic disk and a CD-ROM disk, it should be appreciated by those skilled in the art that other types of media that are readable by a computer system, such as magnetic cassettes, flash memory cards, digital video disks, Bernoulli cartridges, and the like, may also be used in the exemplary operating environment. A number of program modules may be stored in the drives and RAM 25, including an operating system 35, FOSS application program 36, other program modules 37, an input data text file 38, a recipe text file 39, a sequence of executable objects 40 and a modified sequence of executable objects 41. In particular, the FOSS application program 36 which facilitates the modification of the output of a computer program, interacts with the input data text file 38 and the recipe text file 39, in order to modify the output of a computer program without source code modification. An exemplary embodiment of the FOSS application program 36 will be described in detail below with reference to Fig. 2. Other input devices (not shown) may include a microphone, joystick, game pad, satellite dish, scanner, or the like. These and other input devices are often connected to the processing unit 21 through a serial port interface 46 that is coupled to the system bus, but may be connected by other interfaces, such as a game port or a universal serial bus (USB). A display device 47 or other type of device such as a monitor is also connected to the system bus 23 via an interface, such as a video adapter 48. A printer 45 is also connected to the system bus 23 via an interface, such as a parallel inter-face 44. In addition to the display device 47 and printer 45 , personal computer systems typically include other peripheral output devices (not shown), such as speakers. The personal computer system 20 may operate in a networked environment using logical connections to one or more remote computer systems, such as a remote computer system 49. The remote computer system 49 may be a server, a router, a peer device or other common network node, and typically includes many or all of the elements described relative to the personal computer system 20, although only a memory storage device 50 has been illustrated in Fig. 1. The logical connections depicted in Fig. 1 include a local area network (LAN) 51 and a wide area network (WAN) 52. Such networking environments are commonplace in offices, enterprise-wide computer networks, intranets and the Internet. When used in a LAN networking environment, the personal computer system 20 is connected to the LAN 51 through a network interface 53. When used in a WAN networking environment, the personal computer system 20 typically includes a modem 54 or other means for establishing communications over the WAN 52, such as the Internet. The modem 54, which may be internal or external, is connected to the system bus 23 via the serial port interface 46. In a networked environment, program modules depicted relative to the personal computer system 20, or portions thereof, may be stored in the remote memory storage device 50. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computer systems may be used. It will be further appreciated that the invention could equivalently be implemented on host or server computer systems other than personal computer systems, and could equivalently be transmitted to the host computer system by means other than a CD-ROM, for example, by way of the network connection interface 53. Notwithstanding the broad applicability of the principles of the present invention, it should be understood that the configuration of the exemplary embodiment as a FOSS application program 36 for widely-used personal computer systems 20 provides significant advantages. In particular, the FOSS application program 36, comprising computer-implemented instructions for performing the method of the present invention, described in this specification, is specifically designed to exhibit acceptable memory-use and performance characteristics when implemented on the conventional personal computer system 20. In so configuring the review program module 36, certain trade-off balances, particularly between the often conflicting goals of minimizing memory storage and increasing performance speed, have necessarily been struck. It should be understood that variations of the trade-off balances struck in the exemplary embodiments described in this specification are within the spirit and scope of the present invention, particularly in view of the fact that inevitable improvements in computer hardware and memory storage devices will make other trade-off balances feasible. Fig. 2, describes an exemplary method 200 in which the output of a computer program is modified without source code modification. In this embodiment, a program for producing labels for packages to be shipped is described. Method 200 begins at starting block 205 and advances to step 210 where the system is provided with an input data text file 38 containing specific name/value pairs. As shown in Fig. 3, the name/value pairs contained in the input data text file 38 provide information that is to be displayed in the output. Column A of Fig. 3 illustrates the name and column B illustrates the corresponding value of the particular name/value pairs. Specifically, name/value pairs 305 through 330 may indicate the address from which the a package is to be sent, while name/value pairs 335 through 360 may indicate the address to which the a package is to be sent. Name/value pair 365 may indicate information for a bar code which may be placed on the label. In addition, graphical data representing an icon or logo may be included in a name/value pair and included in the input data text file 38. It should be noted that the information contained in the input data text file gives no indication of format by itself, and the name/value pairs of the input data text file 38 need not be arranged according to a required structure. Referring back to Fig. 2, method 200 continues to step 215 where the system is provided with a recipe text file 39 containing formatting descriptions. The recipe text file 39 provided to the system may be selected from a plurality of such files stored on the hard disk 32 and may be specified by information contained in the input data text file 38. For example, the input data text file 38 as shown in Fig. 3 may contain a particular name/value pair 370 designating a particular recipe text file named 4X6Lable. The formatting description contained in the recipe text file 39 may specify the label size, text font and size, and the location of icons such as logos or bar codes. In addition, if a particular destination such as a foreign country is specified in the input data, the formatting will reflect the customs or requirements of the destination. Creation of the appropriate formatted output starts with the recipe text file 39. The recipe text file 39 encapsulates rules for labels, reports and other formatted output and is loaded during the initialization of the FOSS application program 36. It consists of format rule descriptors containing several artifacts and/or other format descriptions. Each artifact may have a constant value or indicate a link to data provided in the name/value pairs of the input data text file 38. The data provided in the input data text file 38 must be in a name/value pair with link names that are used by artifacts to obtain the data to be rendered from the input data text file 38 when the FOSS application program is executed. The conveyance used for passing the input data text file 38 to the FOSS application program is referred to as a bag. A bag can have a name, name-value string pairs, and embedded bags. Items in the bag will not be rendered unless they are referenced as a link in the recipe text file 39. The recipe text file 39 contains the following type of format rule descriptors: format The format item is the root format rule descriptor that defines how to render or more specifically print data onto output devices such as a label printers. It contains a collection of format rule descriptors that define the format output size, default font, default line characteristics, and artifacts. Each format has a name that is used to reference the format recipe. Many of the names are listed as follows. pattern" artifact This artifact is used to allow rendering of multiple data items, from the input data text file 38, within a single artifact format rule descriptor. It operates very much like the "C" programming "printf()" function. Collections of text values are rendered using a specific format. If the referenced items in the pattern do not exist in the data bag then a null string is used as the printed value. "draw" artifact This artifact is used either draw a line, ellipse, or a rectangle. composite" artifact This artifact is used to call another recipe text file to render data to the output device. However, in this case the called format may reference a different bag for data and have a different position on the output device context. For example, there may be a format recipe that defines how to print an address. It may be re-used to print the "ship from" and "ship to" address. However, the data used and the render positions are different. For example, the "ship to" composite artifact would reference an embedded bag that contains just the "ship to" address and have a unique position where to place it on the label. "graphic" artifact This artifact is used to print a graphic image on the output context. This may be used to put a logo on a shipping label. "text" artifact This artifact is used render a single data item from the input data text file 38. "passthrough" artifact This is a special case artifact that is used to bypass any operating system control of the device context and send the rendered data directly to the output device such as a label printer. This may be used if the device driver does not take advantage of specific features that are provided by a printer. Maxi-code artifact This artifact is used to collect specific data from the supplied data bag and render it into a Maxi code image hrcs-code artifact This artifact is used to collect specific data from the supplied input data text file 38 and render it into a human readable sort code. A sort code is a text string, used for sorting packages. "if artifact modifier This is an optional artifact modifier. It indicates that a test is to be performed and passed before the artifact is rendered. The test is a boolean expression that allows the artifact to test for the 5 existence and/or value of items in the input data text file 38. "block" artifact modifier This is a modifier used by all artifacts to specify where to place the artifact text within the defined format recipe. The block defines a rectangle area within the format space. "pen" artifact modifier This is an optional artifact modifier that specifies a line type and width value. "font" artifact modifier This is an optional artifact modifier that specifies a font type and size value. The rules for writing a recipe text file 39 are defined as a Backaus Nauer Format (BNF) grammar. Λ BNF grammar is a technique used to describe a context sensitive set of text that describes a language. In this case, the grammar used represents the rules for describing a recipe text file 39. A sample recipe text file 39 produced using this grammar is shown in Fig. 4. Each line in the grammar represents a rule on how to parse the text within a recipe text file. The rule has the following format: Rule name => Rule The left hand side of the "=>" is the name of the production rule that specifies what to expect in the text stream being parsed. The right hand side is a list of the tokens to expect in the input stream. To support various grammar instances, alternatives must be accommodated in the grammar rules. A single rule may have zero, one, or more possibilities. The actual production depends on the context of the input stream. For example, at specific positions in the recipe text file 39, a format rule may be expected. It could be a line, text, circle, Maxi code symbol, or any defined artifact. In some cases the rule may produce no tokens. For this case a "$" is specified as an alternative rule. Some tokens are enclosed in angle brackets ("< >").This indicates that the token is not actually text in the input stream, but has a definition that is defined by another rule. This is known as a non- terminal token. All other text in the production represents actual text called terminal tokens. The grammar for creating a recipe text file is defined in the following tables. Table I Table II For an example of an application of the aforementioned rules, the following two rules can be obtained from Table 1. Applying the above two rules, the following lines 405 and 410 respectively from the recipe text as shown in Fig. 4 may be produced. ,[font,name=Arial,size=8] ,[pen,width=l,style=solid] As can be seen from line 405, a particular font known as "Arial" with a point size of "8" will be used to print the alphanumeric symbols onto the label. In addition from line 410, the pen width is selected at "1" and will be drawn "solid" as opposed, for example, to dashed. Referring back to Fig. 2, the method 200 advances from step 215 to step 220 where the system converts the recipe text file 39 into a sequence of executable objects suitable for execution on the personal computer system 20. From step 220, the method continues to decision block 225 where user input determines if the user wishes to render output. Examples of media that may receive the rendered output may include laser printers, dot matrix printers, ink jet printers, pin plotters, or electrostatic plotters. In addition, the output may be rendered in an electronic format including e-mail messages, ftp files, gif files, or similar electronic files. Those skilled in the art should appreciate that the invention may be practiced utilizing various forms of output mechanisms. If at decision block 225, the user does not wish to render output, the method continues to step 230 where the method ends. However, if at decision block 225 the user wishes to render output, the method advances to step 235. At step 235, the system executes the sequence of executable objects 40 produced at step 220 to render the name/value pairs of the input data file 38 in accordance with the formatting descriptions of the recipe text file 39. Method 200 then continues to step 240 where in response to user input, the system modifies the recipe text file 39. These modifications may include changing the size of the label to be rendered, the text font and size, or the location of icons such as logos or bar codes to be placed on the table. From step 240 the method continues to step 245 where the system converts the recipe text file as modified into a modified sequence of executable objects 41. Next the method advances to decision block 250 where user input determines if the user wishes to render output. If user does not wish to render output, the method continues to step 255 where the method ends. However, if at decision block 250 the user wishes to render output, the method advances to step 260. At step 260, the system executes the modified sequence of executable objects 41 to render the name/value pairs of the input data file 38 in accordance with the modified formatting descriptions of the recipe text file 39. Since the modified sequence of exect table objects 41 is used, the output format rendered will reflect the modifications previously made. From step 260, method 200 advances to end block 265. In view of the foregoing, it will be appreciated that the present invention provides a method for modifying the output of a computer program without source code modification. Still, it should be understood that the foregoing relates only to the exemplary embodiments of the present invention, and that numerous changes may be made thereto without departing from the spirit and scope of the invention as defined by the following claims.

Claims: CLAIMS The invention claimed is: 1. A system for outputting formatted information comprising: an input data text file comprising a plurality of name/value pairs, a recipe text file comprising a plurality of formatting descriptions, at least some of the formatting descriptions indicating a link to one or more of the name/value pairs; and an execution program configured to: convert the recipe text file into a sequence of executable objects; receive a request for rendering outputs; in response to the request, execute the executable objects to render one or more of said name/value pairs in accordance with said formatting descriptions; such that format can be changed by coordinated alternation of said input data text file and said recipe text file. 2. The system of Claim 1 , wherein the output rendered is a label. 3. A method for outputting formatted information comprising the steps of: providing an input data text file comprising a plurality of name/value pairs; providing a recipe text file comprising a plurality of formatting descriptions, at least some of the formatting descriptions indicating a link to one or more of the name/ value pairs; converting the recipe text file into a sequence of executable objects; receiving a first request for rendering outputs; executing the sequence of executable objects to render one or more of said name/value pairs in accordance with said formatting descriptions; modifying said recipe text file to include one or more modified formatting descriptions; converting said recipe text file as modified into a modified sequence of executable objects; receiving a second request for rendering outputs; and executing the modified sequence of executable objects to render one or more of said name/value pairs in accordance with said modified formatting descriptions. 4. The method of Claim 3 further comprising the step of: modifying said input data text file including one or more modified name/value pairs. 5. The method of Claim 3, wherein the output rendered is a label.

Inventors: HOLLENSTEIN JAMES, SULLIVAN ANDREW, WINKELMAN RICK, HOLLENSTEIN, JAMES, SULLIVAN, ANDREW, WINKELMAN, RICK
Applicants: HOLLENSTEIN JAMES, SULLIVAN ANDREW, UNITED PARCEL SERVICE INC, WINKELMAN RICK, HOLLENSTEIN, JAMES, SULLIVAN, ANDREW, UNITED PARCEL SERVICE OF AMERICA, INC., WINKELMAN, RICK
Application year: 2000
Main classification: G06F9
IPC codes: G06F3, G06F17