J3/04-138 Date: 17 Dec. 2003 To: J3 From: Dan Nagle Subject: Control Leading Zeros Some numeric applications produce very large amounts of formatted output, which must be automatically compared to a reference file for benchmarking or verification purposes. The processor-dependent leading zero of D, E, F format descriptors may greatly complicate this automatic comparison. Following the example of the S, SP, SS descriptors to control the optional leading plus sign, I propose LZ, LZP, LZS descriptors to provide control of the optional leading zero. (Note the difficulty of using either L or Z alone.) Number: Title: Control of Leading Zeros Submitted By: J3 Status: For Consideration References: F 10.6.1.2.1, E D 10.6.1.2.2, SS SP S 10.7.4 Basic Functionality: Define LZ, LZP, LZS edit descriptors ot provide programmer control over the optional leading zero printed by real format descriptors (analogously to the S, SP, SS control of optional plus signs). Rationale: Large output datasets may require automatic comparison, perhaps using the Unix 'diff' program or similar. This comparison can be made more difficult by optional characters, such as a leading zero in F, D, E formats. Allowing precise control allows character-for-character formatted output to be made. Estimated Impact: Processors will have to support one more control edit descriptor. Since some processors choose to print or not the optional leading zero, either choice is not too difficult. Detailed Specification: Add LZ, LZP, LZS control edit descriptors, as follows: LZP- print a leading zero with following F, D, E edit descriptors; LZS- suppress the leading zero with following F, D, E edit descriptors; LZ- the leading is optional (processor default). Example: FMT='( LZP, F8.4, E16.8, D20.10) print leading zeros' History: