View previous topic :: View next topic
|
Author |
Message |
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
HI All,
I have developed an ISPF Panel. In the ISPF Panel, there is an input field. Whatever is there in the input field, should get stored on to a PDS through a CLIST. The functionality is working fine, but i am facing 1 problem.
Whenever i give input as
ABC-DEF
or any other arithmetic operators, the program fails to store it into PDS.
Could you please help here???
I have tried defining many things in VER ####,
VER (&STYPE,NB,####,MSG=SRCH020)
but cant get through.
Please help. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
Quote: |
Could you please help here??? |
NO without any additional info
You did not post anything useful,
post Your rexx ( using the code tags )
both the original source
and a run with TRACE "I" turned on
are You really using a CLIST
in this case You are not likely to get too much help |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Hi Enrico,
Following is the exact problem im facing.
Code: |
PROC 0
ALLOCATE FILE(RSTR) DA('EV4.RT.SCH.QUEUE') MOD REU
OPENFILE RSTR OUTPUT
SET &RSTR = -
WRITE LASTCC1 = &LASTCC
PUTFILE RSTR
WRITE LASTCC2 = &LASTCC
CLOSFILE RSTR
EXIT CODE(0)
|
The error response is:
Code: |
SET &RSTR = WRITE LASTCC1 = 0
THIS STATEMENT HAS AN EXPRESSION WITH OPERATORS OUT OF SEQUENCE
***
|
This error i believe is coming because of - being the symbol for continuation in next line. How can i handle this? |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Have you tried
Code: |
SET &RSTR = &STR(-) |
|
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
expat wrote: |
Have you tried
Code: |
SET &RSTR = &STR(-) |
|
Hi expat,
That almost solved my problems.
But it still fails for &.
ie the code fails if :
Code: |
PROC 0
ALLOCATE FILE(RSTR) DA('EV4.RT.SCH.QUEUE') MOD REU
OPENFILE RSTR OUTPUT
SET &RSTR = &STR(&)
WRITE LASTCC1 = &LASTCC
PUTFILE RSTR
WRITE LASTCC2 = &LASTCC
CLOSFILE RSTR
EXIT CODE(0)
|
The O\P is:
Code: |
SET &RSTR = &STR(&)
THIS STATEMENT HAS AN INVALID SYMBOLIC VARIABLE
***
|
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well it amazes me that I even remembered &STR as it's over 20 years since I wrote or even looked at a CLIST.
There is a variation on &STR - might be &NSTR or something like that. Take a look in the manuals and see. |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
expat wrote: |
Well it amazes me that I even remembered &STR as it's over 20 years since I wrote or even looked at a CLIST.
There is a variation on &STR - might be &NSTR or something like that. Take a look in the manuals and see. |
Hi,
I looked into the manuals.
U were right, &NRSTR is the command for &
but it works for if there are even nos of &s
like &&, &&&&.
but not for odd.... |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Just to add here,
if i have,
case1
Code: |
SET &ROBTSTR = &NRSTR(&)
|
o\p is
Code: |
SET &ROBTSTR = &NRSTR(&)
THIS STATEMENT HAS AN INVALID SYMBOLIC VARIABLE
|
case 2
Code: |
SET &ROBTSTR = &NRSTR(STRA&STRB)
|
the o\p written to pds is STRA
case3
Code: |
SET &ROBTSTR = &NRSTR(STRA&&STRB)
|
the o\p written is STRA&&STRB
But the o\p should be exactly the same what input is for all the cases..... |
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Hi All,
Looked extensively into the manuals...but could not figure out the way ahead. Could you please help here? |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2547 Location: Silicon Valley
|
|
|
|
Please try using rexx instead of clist.
Have you tried the 'no substitution' function?
Code: |
&SYSNSUB(level,expression) |
|
|
Back to top |
|
|
Akash Sharma
New User
Joined: 13 Jan 2009 Posts: 36 Location: India
|
|
|
|
Pedro wrote: |
Please try using rexx instead of clist.
Have you tried the 'no substitution' function?
Code: |
&SYSNSUB(level,expression) |
|
Thanks a lot.
This worked.
Everything working fine now. |
|
Back to top |
|
|
|