Effective February 22, 2024, Google Groups will no longer support new Usenet content. Posting and subscribing will be disallowed, and new content from Usenet peers will not appear. Viewing and searching of historical data will still be supported as it is done today.
Dismiss

How to remove BLANKS from the middle of Var

51 views
Skip to first unread message

Lizette Koehler

unread,
Jun 26, 2009, 12:32:56 PM6/26/09
to
I am working with LISTDSI and I would like to take the date created in SYSCREATE and make it more like June 01, 2006 or 01Jun06.

Since the filed comes back as 2006/150 I was giong to parse out the two fields and recombine then and then use the DATE function.

When I display my combined date I get 06__150 (_ represents a blank).

What am I doing wrong?

LISTDSI(My_Prof DIRECTORY NORECALL)

Jul_LL = Length(Syscreate)
Jul_Lngth = Pos('/',Syscreate)
Jul_Year = Strip(Substr(Syscreate,1,Jul_Lngth-1),'b')
Jul_Days = Strip(Substr(Syscreate,Jul_Lngth+1,Jul_ll),'b')
Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')
Say " Create Date " SYSCREATE " " Jul_Date

From Trace

26 *-* Jul_LL = Length(Syscreate)
>V> "2006/150"
>F> "8"

27 *-* Jul_Lngth = Pos('/',Syscreate)
>L> "/"
>V> "2006/150"
>F> "5"

28 *-* Jul_Year = Strip(Substr(Syscreate,1,Jul_Lngth-1),'b')
>V> "2006/150"
>L> "1"
>V> "5"
>L> "1"
>O> "4"
>F> "2006"
>L> "b"
>F> "2006"

29 *-* Jul_Days = Strip(Substr(Syscreate,Jul_Lngth+1,Jul_ll),'b')
>V> "2006/150"
>V> "5"
>L> "1"
>O> "6"
>V> "8"
>F> "150 "
>L> "b"
>F> "150"

30 *-* Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')
>V> "2006"
>L> "b"
>F> "2006"
>L> "3"
>L> "4"
>F> "06 "
>V> "150"
>L> "b"
>F> "150"

>O> "06 150"

31 *-* Say " Create Date " SYSCREATE " " Jul_Date
>L> " Create Date "
>V> "2006/150"
>O> " Create Date 2006/150"
>L> " "
>O> " Create Date 2006/150 "
>V> "06 150"
>O> " Create Date 2006/150 06 150"
Create Date 2006/150 06 150

Lizette

----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX

Rabbe, Luke

unread,
Jun 26, 2009, 12:44:02 PM6/26/09
to
Do you only want to get a Substr here that is 2 characters long as
opposed to 4?

Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')

Luke

Mark Zelden

unread,
Jun 26, 2009, 12:55:28 PM6/26/09
to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU> wrote on 06/26/2009
11:32:36 AM:

> I am working with LISTDSI and I would like to take the date created in
SYSCREATE and
> make it more like June 01, 2006 or 01Jun06.
>
> Since the filed comes back as 2006/150 I was giong to parse out the two
fields and
> recombine then and then use the DATE function.
>
> When I display my combined date I get 06__150 (_ represents a blank).
>
> What am I doing wrong?
>
> LISTDSI(My_Prof DIRECTORY NORECALL)
>
> Jul_LL = Length(Syscreate)
> Jul_Lngth = Pos('/',Syscreate)
> Jul_Year = Strip(Substr(Syscreate,1,Jul_Lngth-1),'b')
> Jul_Days = Strip(Substr(Syscreate,Jul_Lngth+1,Jul_ll),'b')
> Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')
> Say " Create Date " SYSCREATE " " Jul_Date
>

<snip>

If I understand correctly, you want to reverse the strip/substr
on Jul_Date by changing:

Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')

to

Jul_Date = Strip(Substr(Jul_Year,3,4),'b')||Strip(Jul_days,'b')

--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:mark....@zurichna.com
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

******************* PLEASE NOTE *******************
This E-Mail/telefax message and any documents accompanying this
transmission may contain privileged and/or confidential information and is
intended solely for the addressee(s) named above. If you are not the
intended addressee/recipient, you are hereby notified that any use of,
disclosure, copying, distribution, or reliance on the contents of this
E-Mail/telefax information is strictly prohibited and may result in legal
action against you. Please reply to the sender advising of the error in
transmission and immediately delete/destroy the message and any
accompanying documents. Thank you.

Lizette Koehler

unread,
Jun 26, 2009, 12:56:20 PM6/26/09
to
Thanks everyone. That was my problem, 3,4 vs 3,2. Going between languages does make for some interesting issues.

Lizette


>
>Do you only want to get a Substr here that is 2 characters long as
>opposed to 4?
>

>Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')
>
>

>Luke


>
>
>>I am working with LISTDSI and I would like to take the date created in
>SYSCREATE and make it more like June 01, 2006 or 01Jun06.
>
>Since the filed comes back as 2006/150 I was giong to parse out the two
>fields and recombine then and then use the DATE function.
>
>When I display my combined date I get 06__150 (_ represents a blank).
>
>What am I doing wrong?
>
>LISTDSI(My_Prof DIRECTORY NORECALL)
>
>Jul_LL = Length(Syscreate)
>Jul_Lngth = Pos('/',Syscreate)
>Jul_Year = Strip(Substr(Syscreate,1,Jul_Lngth-1),'b')
>Jul_Days = Strip(Substr(Syscreate,Jul_Lngth+1,Jul_ll),'b')
>Jul_Date = Substr(Strip(Jul_Year,'b'),3,4)||Strip(Jul_days,'b')
>Say " Create Date " SYSCREATE " " Jul_Date
>
>
>

----------------------------------------------------------------------

Dunkel, Martin

unread,
Jun 26, 2009, 1:09:11 PM6/26/09
to
Just as a side note, I often like parse var better. It is often
cleaner:

PARSE VAR SYSCREATE YYYY "/" DDD .
SAY YYYY DDD

Martin Dunkel
ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

Luke

LISTDSI(My_Prof DIRECTORY NORECALL)

From Trace

>O> "06 150"

Lizette


-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

Ulrich Krueger

unread,
Jun 26, 2009, 1:14:21 PM6/26/09
to
Luke,
You should be able to use the DATE() function to read your Julian date value
and return a converted date format in something like mm/dd/yy or other
format.
See
http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IKJ4A370/4.3.16?S
HELF=EZ2ZO10K&DT=20060626210253
for more info.
If you need individual variables for Jul_year and Jul_days, you could try
something like
PARSE VAR Syscreate Jul_year "/" Jul_days
(not tested, I'm not near a mainframe right now)

HTH.

Regards,
Ulrich Krueger

Dunkel, Martin

unread,
Jun 26, 2009, 1:30:05 PM6/26/09
to
Lizette,

The date function does not convert Julian format to anything. You need
to do it yourself. Here is my simple solution:

You know the year, yyyy, so establish Jan 1 in base date format, add the
julian days (minus 1), then convert it back into whatever format you
want.

/* REXX */
trace ?i
my_prof="'$mpd1.pds.cmnlib1'"
rc = listdsi(my_prof directory norecall)

parse var syscreate yyyy "/" ddd .
j1="1 Jan" yyyy
j1_b=date("b",j1,"n")
j2_b=j1_b+ddd-1
j2=date("n",j2_b,"b")
exit

Martin Dunkel
ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Lizette Koehler
Sent: Friday, June 26, 2009 12:33 PM
To: TSO-...@VM.MARIST.EDU
Subject: [TSO-REXX] How to remove BLANKS from the middle of Var

LISTDSI(My_Prof DIRECTORY NORECALL)

From Trace

>O> "06 150"

Lizette

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

----------------------------------------------------------------------

Dunkel, Martin

unread,
Jun 26, 2009, 1:36:33 PM6/26/09
to
Lizette,

The variables I used, j1 and j2, don't really make much sense. I used
j1 to indicate Jan 1, then at the end I came up with a j2, which does
not mean Jan 2; rather, it is just your final output date converted to
the format you want.

Sorry about that. Use whatever variable names make sense to you.

216-257-5354 (office)

Lizette,

216-257-5354 (office)

LISTDSI(My_Prof DIRECTORY NORECALL)

From Trace

>O> "06 150"

Lizette

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

----------------------------------------------------------------------

Walter Pachl

unread,
Jun 26, 2009, 1:43:17 PM6/26/09
to
say translate('abcd efgh',syscreate,'abcdefgh') /* untested but only one
line */

Mark Zelden

unread,
Jun 26, 2009, 2:05:31 PM6/26/09
to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU> wrote on 06/26/2009
12:28:56 PM:

> Lizette,
>
> The date function does not convert Julian format to anything. You need
> to do it yourself. Here is my simple solution:
>

I have a date conversion routine on my web site (URL below) caled
RDATE. I wrote it prior to REXX supporting an input date conversion
format (OS/390 2.4). But it still can do some stuff the builtin
DATE function can't.

Mark


--
Mark Zelden
Sr. Software and Systems Architect - z/OS Team Lead
Zurich North America / Farmers Insurance Group - ZFUS G-ITO
mailto:mark....@zurichna.com
z/OS Systems Programming expert at
http://expertanswercenter.techtarget.com/
Mark's MVS Utilities: http://home.flash.net/~mzelden/mvsutil.html

******************* PLEASE NOTE *******************
This E-Mail/telefax message and any documents accompanying this
transmission may contain privileged and/or confidential information and is
intended solely for the addressee(s) named above. If you are not the
intended addressee/recipient, you are hereby notified that any use of,
disclosure, copying, distribution, or reliance on the contents of this
E-Mail/telefax information is strictly prohibited and may result in legal
action against you. Please reply to the sender advising of the error in
transmission and immediately delete/destroy the message and any
accompanying documents. Thank you.

----------------------------------------------------------------------

Schwarz, Barry A

unread,
Jun 26, 2009, 2:58:34 PM6/26/09
to
Since I use the date function to convert dates between many different
formats, including Julian, what am I misinterpreting about your
assertion?

-----Original Message-----
From: Dunkel, Martin

Sent: Friday, June 26, 2009 10:29 AM
To: TSO-...@VM.MARIST.EDU
Subject: Re: How to remove BLANKS from the middle of Var

Lizette,

The date function does not convert Julian format to anything. You need
to do it yourself. Here is my simple solution:

----------------------------------------------------------------------

Dunkel, Martin

unread,
Jun 26, 2009, 3:11:48 PM6/26/09
to
Barry,

I stand corrected!

Here is what it says in the Rexx manual:

Julian date in the format: yyddd.
Note: When used for date_format1, this option is valid only when
input_date is not specified.

I have just interpreted this to mean that Rexx doesn't convert Julian to
other formats. But, honestly, I never tried it. WOW!!!

Here's my code:

/* REXX */
trace ?i

dj="09177"
dt=date("n",dj,"j")
exit

Here's my trace:

3 *-* dj="09177"
>L> "09177"
4 *-* dt=date("n",dj,"j")

>L> "n"
>V> "09177"
>L> "j"
>F> "26 Jun 2009"
5 *-* exit
***

Looks good. THANKS!!!

Martin Dunkel
ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf

Of Schwarz, Barry A
Sent: Friday, June 26, 2009 2:57 PM
To: TSO-...@VM.MARIST.EDU

Lizette,

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

----------------------------------------------------------------------

Dunkel, Martin

unread,
Jun 26, 2009, 3:20:57 PM6/26/09
to
Barry,

So, regarding Lizette's original question, here is the simplified code I
came up with:

/* REXX */

my_prof="'$mpd1.pds.cmnlib1'"
rc = listdsi(my_prof directory norecall)

parse var syscreate yyyy "/" ddd .

yy=right(yyyy,2)
dj=yy||ddd

dt=date("n",dj,"j")

say dt
exit

Note: Rexx Julian format is yyddd with a 100 year sliding window. So,
that is why I am only using the right two characters of yyyy to get yy.

Martin Dunkel
ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

-----Original Message-----
From: Dunkel, Martin
Sent: Friday, June 26, 2009 3:11 PM
To: 'TSO REXX Discussion List'
Subject: RE: [TSO-REXX] How to remove BLANKS from the middle of Var

Barry,

I stand corrected!

Here is what it says in the Rexx manual:

Julian date in the format: yyddd.
Note: When used for date_format1, this option is valid only when
input_date is not specified.

I have just interpreted this to mean that Rexx doesn't convert Julian to
other formats. But, honestly, I never tried it. WOW!!!

Here's my code:

/* REXX */
trace ?i

dj="09177"
dt=date("n",dj,"j")
exit

Here's my trace:

3 *-* dj="09177"
>L> "09177"
4 *-* dt=date("n",dj,"j")

>L> "n"
>V> "09177"
>L> "j"
>F> "26 Jun 2009"
5 *-* exit
***

Looks good. THANKS!!!

Martin Dunkel


ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf

Of Schwarz, Barry A
Sent: Friday, June 26, 2009 2:57 PM
To: TSO-...@VM.MARIST.EDU

Lizette,

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

----------------------------------------------------------------------

Scott Gonyea

unread,
Jun 26, 2009, 3:29:51 PM6/26/09
to
Why so little love for TRANSLATE? You people make TRANSLATE sad :-(

****** ***************************** Top of Data
******************************
000001 /* REXX
***************************************************************/
000002 /* */
000003 /* List dataset information to get date (in SYSCREATE variable)
*/
000004 /* */
000005 x = LISTDSI("'CJAY.REXX' DIRECTORY NORECALL") /* x is unused */
000006 /* */
000007 /* Use 'TRANSLATE' method to transform text into DATE() readable
form */
000008 /* */
000009 /* Junk: vv v */
000010 crDate = TRANSLATE('YRDAT', SYSCREATE, '--YR/DAT')
000011 /* */
000012 SAY "Creation Date is:" crDate
000013 /* */
000014 /* Convert using DATE() method */
000015 nmDate = DATE(, crDate, 'J')
000016 SAY "Normalized Date is:" nmDate
000017 /* */
000018 /* EOF
****************************************************************/
****** **************************** Bottom of Data
****************************

Creation Date is: 08270
Normalized Date is: 26 Sep 2008
***


Yours,
Scott Gonyea
Enterprise Information Security Office


The information contained in this electronic message and any attachments
to this message is intended for the exclusive use of the addressee(s) and
may contain confidential or privileged information. If you are not the
intended recipient, please notify the sender at American Honda Motor Co.,
Inc. or scott_...@ahm.honda.com immediately and destroy all copies of
this message and any attachments.

Lizette Koehler <star...@mindspring.com>
Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
06/26/2009 09:32 AM
Please respond to
Lizette Koehler <star...@mindspring.com>


To
TSO-...@VM.MARIST.EDU
cc

Subject


[TSO-REXX] How to remove BLANKS from the middle of Var

Jeff Byrum

unread,
Jun 26, 2009, 3:38:50 PM6/26/09
to
Instead of:

parse var syscreate yyyy "/" ddd .
yy=right(yyyy,2)
dj=yy||ddd

you could just code this:

dj = TRANSLATE('34678',syscreate,'12345678')

PARSE is great when the tokens you want to isolate are variable in length, but if the format is fixed, as in this case, TRANSLATE works fine.

I'll admit I find the syntax a little hard to grasp, but all the above says is to take positions 3, 4, 6, 7 and 8 of the input string and put them together as one 5-char string, like this:

12345678
|| |||
yyyy/ddd

Dunkel, Martin

unread,
Jun 26, 2009, 3:40:41 PM6/26/09
to
Scott,

PARSE is a keyword instruction and TRANSLATE is a built-in function. I
have been told that PARSE has less overhead. But, who knows? I'm on a
downward "wrong" streak today. So, I could be wrong again. ;-)

I guess it's just a matter of preference. I usually prefer the fewest
lines of code to accomplish a task. And, I really like PARSE. PARSE
automatically strips leading and trailing blanks without having to tell
it to do so. And, I think the entire Rexx language was built around
PARSE.

Oh well, have a good weekend all...

Martin Dunkel
ECS - Release Management
National City, now a part of PNC

216-257-5354 (office)

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf
Of Scott Gonyea
Sent: Friday, June 26, 2009 3:29 PM
To: TSO-...@VM.MARIST.EDU


To
TSO-...@VM.MARIST.EDU
cc

LISTDSI(My_Prof DIRECTORY NORECALL)

From Trace

>O> "06 150"

Lizette

-------------------------------------------------------------------------------------------
***National City made the following annotations
-------------------------------------------------------------------------------------------
This communication is a confidential and proprietary business communication.
It is intended solely for the use of the designated recipient(s). If this
communication is received in error, please contact the sender and delete
this communication.
===========================================================================================

----------------------------------------------------------------------

Jeff Byrum

unread,
Jun 26, 2009, 3:42:11 PM6/26/09
to
Excellent! Much easier to understand than "34678"! Thanks!

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Scott Gonyea
Sent: Friday, June 26, 2009 3:29 PM
To: TSO-...@VM.MARIST.EDU

Dunkel, Martin

unread,
Jun 26, 2009, 3:43:52 PM6/26/09
to
OKAY, OKAY, OKAY, YOU BEAT ME! STOP THE INSANITY! ;-)

I'm heading home, chuckling.

Paul Gilmartin

unread,
Jun 26, 2009, 3:51:52 PM6/26/09
to
On 06/26/09 11:28, Dunkel, Martin wrote:
>
> The date function does not convert Julian format to anything. You need
> to do it yourself.
>
RTFM.

-- gil

Scott Gonyea

unread,
Jun 26, 2009, 3:53:05 PM6/26/09
to
Hi Martin,

I know what you're saying, but in my opinion... If overhead or speed are
ever an issue--interpreted languages shouldn't be used in the first place.
Everything should be about readability and maintainability, first and
foremost. Storage and CPU cycles have been cheaper than labor for decades
now, so it always blows my mind when I see a programmer taking the "long"
route.

Besides, I'm sure if you compile the REXX then it will be optimized so the
TRANSLATE is actually faster than the PARSE + variable assignments, etc.

Yours,
Scott Gonyea
Enterprise Information Security Office


The information contained in this electronic message and any attachments
to this message is intended for the exclusive use of the addressee(s) and
may contain confidential or privileged information. If you are not the
intended recipient, please notify the sender at American Honda Motor Co.,
Inc. or scott_...@ahm.honda.com immediately and destroy all copies of
this message and any attachments.

"Dunkel, Martin" <Martin...@NATIONALCITY.COM>


Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>

06/26/2009 12:39 PM
Please respond to


TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>


To
TSO-...@VM.MARIST.EDU
cc

Paul Gilmartin

unread,
Jun 26, 2009, 3:57:29 PM6/26/09
to
On 06/26/09 10:32, Lizette Koehler wrote:
> I am working with LISTDSI and I would like to take the date created in SYSCREATE and make it more like June 01, 2006 or 01Jun06.
>
> Since the filed comes back as 2006/150 I was giong to parse out the two fields and recombine then and then use the DATE function.
>
> When I display my combined date I get 06__150 (_ represents a blank).
>
> What am I doing wrong?
>
I've not read this thread to the end, but how about:

user@MVS:139$ rexx "trace R; Syscreate = '2006/150';
say date( 'N', substr( Syscreate, 3, 2 )right( Syscreate, 3 ), 'J' )"
1 *-* Syscreate = '2006/150'
>>> "2006/150"
*-* say date( 'N', substr( Syscreate, 3, 2 )right( Syscreate, 3 ), 'J' )
>>> "30 May 2006"
30 May 2006
user@MVS:139$

-- gil

Scott Gonyea

unread,
Jun 26, 2009, 3:58:21 PM6/26/09
to
Oh no you di'int

Yours,
Scott Gonyea
Enterprise Information Security Office


The information contained in this electronic message and any attachments
to this message is intended for the exclusive use of the addressee(s) and
may contain confidential or privileged information. If you are not the
intended recipient, please notify the sender at American Honda Motor Co.,
Inc. or scott_...@ahm.honda.com immediately and destroy all copies of
this message and any attachments.

Paul Gilmartin <PaulGB...@AIM.COM>


Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>

06/26/2009 12:50 PM


Please respond to
TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>


To
TSO-...@VM.MARIST.EDU
cc

Subject
Re: [TSO-REXX] How to remove BLANKS from the middle of Var

Paul Gilmartin

unread,
Jun 26, 2009, 5:06:42 PM6/26/09
to
On 06/26/09 13:56, Scott Gonyea wrote:
> Oh no you di'int
>
In fact, true; but I have now, and I stand by my assertion.

> Paul Gilmartin <PaulGB...@AIM.COM>
> Sent by: TSO REXX Discussion List <TSO-...@VM.MARIST.EDU>
> 06/26/2009 12:50 PM
>

> On 06/26/09 11:28, Dunkel, Martin wrote:
>> The date function does not convert Julian format to anything. You need
>> to do it yourself.
>>
> RTFM.
>

I mean:

4.3.16 "z/OS V1R7.0 TSO/E REXX Reference"
___________________________________________________________________
4.3.16 DATE
________________________________________________________________________
| |
| >>__DATE__(__ __________________________________________________ ____> |
| |_date_format1_ ________________________________ __| |
| | |_,input_date_ _______________ __| | |
| | |_,date_format2_| | |
| |_,input_date_ _______________ ____________________| |
| |_,date_format2_| |
| |
| >__)________________________________________________________________>< |
| |
|________________________________________________________________________|

returns, by default, the local date in the format: dd mon yyyy (day,
month, year--for example, 25 Dec 2001), with no leading zero or blank on
the day. Otherwise, the string input_date is converted to the format
specified by date_format1. date_format2 can be specified to define the
current format of input_date.

... which tells how to use DATE() to convert one date format to
another. A couple other plies in this thread have made similar
suggestions.

Gardiner, Roy , UK Europe and Middle East, Technology Services

unread,
Jun 29, 2009, 5:19:06 AM6/29/09
to
Preference, and what's to be done.

TRANSLATE is for when simplification or transformation is required at
the individual character level. It is so powerful that if you have such
a problem* a good approach is 'The answer is TRANSLATE; now, how do I do
it?' PARSE is better for manipulating blocks of characters and
especially for when what is found influences how the parse continues.


'I have a string. It may contain any character. I wish to form a
string 26 characters long, '1' in the first position if my string
contains at least one 'A', '0' if it does not, and so on'.

> *** WARNING : This message originates from the Internet ***
>
>
The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

Gardiner, Roy , UK Europe and Middle East, Technology Services

unread,
Jun 29, 2009, 5:39:21 AM6/29/09
to
Martin, I think your interpretation is common. I have not written Rexx
in anger for some years, read this thread, got fooled again.

The manual might, IMO, be worded better -- I hope this is right... :-)

'Date() can be used to convert between any of the Rexx formats, with one
exception. It will not convert *to* Julian format (converting *from*
Julian format is possible).'

> -----Original Message-----
> From: TSO REXX Discussion List

> [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Dunkel, Martin

> *** WARNING : This message originates from the Internet ***
>
>
The Royal Bank of Scotland plc, Registered in Scotland No. 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB

Authorised and regulated by the Financial Services Authority.

This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc does not accept responsibility for changes made to this message after it was sent.

Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by The Royal Bank of Scotland plc in this regard and the recipient should carry out such virus and other checks as it considers appropriate.

----------------------------------------------------------------------

Hamilton Phd, Robert L

unread,
Jun 29, 2009, 9:05:48 AM6/29/09
to
It's true in OBJREXX also: got this error

Oooops ! ... try again. Incorrect call to routine
DATE argument 1 must be one of BDELMNOSUW;
found "J"
rc = 40 ....................................... Program on WindowsNT

-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] Subject:
Re: How to remove BLANKS from the middle of Var

Martin, I think your interpretation is common. I have not written Rexx
in anger for some years, read this thread, got fooled again.

The manual might, IMO, be worded better -- I hope this is right... :-)

'Date() can be used to convert between any of the Rexx formats, with one
exception. It will not convert *to* Julian format (converting *from*
Julian format is possible).'

Dunkel, Martin

unread,
Jun 29, 2009, 9:22:39 AM6/29/09