Thanks for pointing out %08X (pad 8-character field with zeroes to exceed 
default precision). I'm not that big on C/C++ as yet, still learning. So are 
IBM z/UNIX programmers, apparently. 

Ant.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf 
Of Tom Brennan
Sent: Friday, 22 April 2016 1:02 PM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: New to RACF

Or they could use "%08X" to tell printf to tag on the leading zeros - no 
counting needed.

Here's one that always looks strange to me:

"You have 1 records"

I think that *does* take some extra C coding to fix unless someone can tell me 
some printf tricks.

Years ago I wrote some assembler macros and subroutines to simulate C string 
routines, including printf.  I seem to remember having logic that would scan 
the next word in the source string looking for a trailing S, and would drop it 
if the number displayed was 1.  For example:

   #PRINTF 'You have %d records',COUNT

... would result in good grammar no matter what number was displayed.

Anthony Thompson wrote:
> The error reason is actually 0B7F1C00, it's the C/C++ library functions being 
> called from within copytree command (like printf, fprint, etc) that drop 
> leading zeroes. I've seen it many times in error messages from z/UNIX 
> commands . It is fixable in C/C++ code, but the programmer needs to count the 
> number of digits to be output and manually add their own leading zeros. Not 
> many can be bothered.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email to 
lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to