Don't use the UNIX date command. If IBM had ported the GNU version, it
would be easy. What I do is use REXX. A UNIX REXX shell script is rather
easy:

/* rexx */
today=date('b') /* today's date in base form */
yesterday = today - 1
say date('s',yesterday,'b') /* yesterday in yyyymmdd form */

Ref for REXX "date" function:
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A390/4.3.16



On Thu, Mar 14, 2013 at 6:54 AM, Uwe Oswald
<uwe.osw...@zit-consulting.com>wrote:

> Hi,
>
> I dont know if this is the right forum but I hope someone could help
> anyway. I want to subtract "one day" from the actual date with one USS unix
> command.
>
> The actual date I get via "date +%Y%m%d" (for example 20130314), but "date
> +%Y%m%d-1" or "...yesterday" don’t work. I have tried everything without
> success. Does anybody have a tip for me? It must be achieved within one
> command not more.
>
> Thx
> Uwe
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>



-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

----------------------------------------------------------------------
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