Welcome, Guest. Please login or register.

Author Topic: Problems with PARSE (Rexx)  (Read 1751 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline iamaboringpersonTopic starter

  • Hero Member
  • *****
  • Join Date: Jun 2002
  • Posts: 5744
    • Show all replies
Problems with PARSE (Rexx)
« on: July 31, 2006, 01:43:00 AM »
Hi, I've been having troubles with the Rexx PARSE instruction.

When I want the first part of a string I get nothing.

EG.

Code: [Select]

BLAH="1.2.3"

PARSE VAR BLAH WITH num1'.'num2'.'num3

SAY NUM1 NUM2 NUM3

I get:

2 3

The only way I've been able to work around this, is to put something in front of the variable.

Like so:

Quote

BLAH="1.2.3"

BLAH_T='a'BLAH

PARSE VAR BLAH_T WITH 'a'num1'.'num2'.'num3

SAY NUM1 NUM2 NUM3


But this is inelegant, and it messes with the data. It's possible that depending on what data is coming in, it may not work.

Surely there is some way around this problem?

Thanks in advance if anybody can help me!