Actually, I wasn't using the Rexx to interpret the date in my example - it just 
checked the equality of two strings.

JCL converted '&TODAY' into 'FRI' so the argument passed to rexx 
was 'FRI=FRI'.

Rexx does have many functions, though, and they are all available this way.
So...
//TEST     EXEC PGM=IRXJCL,PARM='SETCC Date(W)="Friday"'
will work without the // SET TODAY=FRI statement.
Note the extra quotation marks are required to keep Rexx from converting 
Friday to FRIDAY (because the Date(W) function returns Friday, not FRIDAY).

//TEST     EXEC PGM=IRXJCL,PARM='SETCC Date(B)//7'
will return 0-6 where 0=Monday and 6=Sunday.

See
http://publibz.boulder.ibm.com/cgi-
bin/bookmgr_OS390/BOOKS/IKJ4C310/CCONTENTS?SHELF=IKJ4BK90&DN=SA22-
7791-01&DT=20010706113306
(watch the wrap) for all the available Rexx functions.

On Fri, 26 Jun 2009 12:46:02 -0400, Barkow, Eileen 
<ebar...@doitt.nyc.gov> wrote:

>i did not know that Rexx can convert a day to a number (at least  I
>think that is what it is doing).  is this returning the day of the week
>1-7 or just setting 1 if it is friday.
>my program can also return the month of the year (1-12), day of year
>(1-365)  time of day (0-2400) and day of week (1-7), but it is helpful
>to know that alot of these functions may be available in Rexx.
>
>Thanks for the info Robert.
>
>-----Original Message-----
>From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On
>Behalf Of Robert Birdsall
<snip>

>SetCC:  (I'll borrow your program name)
>interpret 'return' arg(1)
>
>JCL fragment:
>// SET TODAY=FRI
>//TEST     EXEC PGM=IRXJCL,PARM='SETCC &TODAY=FRI'
>//SYSEXEC  DD DISP=SHR,DSN=pds.contains.setcc
>//*
>// IF (TEST.RC = 1) THEN
>//CODE     EXEC PGM=IEFBR14
>// ENDIF

</snip>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to