Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

SUBSTR ERROR IN ISPF PANEL

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
View previous topic :: :: View next topic  
Author Message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Fri Sep 21, 2012 7:19 pm    Post subject: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Hi,

I have devloped panel listed below and iam validating all panel macros in panel defintion itself and iam facing errors as " Unrecognized keyword" in substr statement in .proc section .

i tried with other possibilities but couldn't able to figure out to solve the issue . Can any one please help me to resolve this issue and alsohow to use inbuilt function (sustr) for panel macro.

Code:
)ATTR  FORMAT(MIX)                                                     
 % TYPE(TEXT) INTENS(HIGH)                                             
 + TYPE(TEXT) INTENS(LOW)                                               
 * TYPE(TEXT) INTENS(HIGH) COLOR(GREEN)                                 
 # TYPE(TEXT) INTENS(HIGH) COLOR(YELLOW)                               
 { TYPE(TEXT) INTENS(HIGH) COLOR(WHITE)                                 
 ¬ TYPE(TEXT) INTENS(HIGH) COLOR(TURQ)                                 
 @ TYPE(TEXT) INTENS(HIGH) COLOR(RED)                                   
 _ TYPE(INPUT) COLOR(GREEN) PAD(_) CAPS(OFF)                           
 ! TYPE(OUTPUT) COLOR(RED)  PAD(_)                                     
 $ TYPE(TEXT) COLOR(YELLOW) PAD(_)                                     
)BODY                                                                   
$                                                                       
%                                                                       
%                                                                       
%                   #MENU TESTING                         
%                                                                       
%                                                                       
%    ¬APPLICATION      +_APL+                                           
%                                                                       
%    ¬UNIT TESTING     +_U+                                             
%                                                                       
%    ¬REGRESSION TEST  +_R+                                             
%                                                                       
%    ¬USER ID          +_ENTRID+                                     + 
%                                                                    + 
%                                                                    + 
%                                                                    + 
%                                                                    + 
%                                                                    + 
%                                                                    + 
%                                                                    + 
%                    @PF3+- EXIT      @ENTER+- PROCESS               + 
%                                                                    + 
)INIT                                                                   
 &ZCMD   = ' '                                                         
 &APL    = ' '                                             
 &U      = ' '                                             
 &R      = ' '                                             
 &ENTRID = ' '                                             
)REINIT                                                     
   .CURSOR = &CURS                                         
   .ATTR(.CURSOR) = 'COLOR(RED) HILITE(BLINK)'             
)PROC                                                       
   VER(&APL,NB,MSG=PRD001)                                 
   VER(&U  ,NB,MSG=PRD001)                                 
   VER(&R  ,NB,MSG=PRD001)                                 
   VER(&ENTRID,NB,MSG=PRD001)                               
   VER(&U,LIST,'Y','N',MSG=PRD002)                         
   VER(&R,LIST,'Y','N',MSG=PRD002)                         
   VER(&APL,LIST,'AAA','BBB','CCC','GGG','HHH','TTT',       
       'YYY',MSG=PRD003)                                   
   IF (&U = 'Y' AND &R= 'Y') .MSG=PRD004                   
   VER(SUBSTR(&ENTRID,1,4),LIST,'TAM',MSG=PRD005)    <-   error showing         
   IF (.RESP = END)                                         
        &OFLAG = 'Y'                                       
       VPUT (OFLAG)                                         
    IF (.RESP = END)                                       
        EXIT                                               
    VPUT (APL U R ENTRID) PROFILE                           
)END
Back to top
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1738
Location: Bloomington, IL

PostPosted: Fri Sep 21, 2012 7:37 pm    Post subject:
Reply with quote

You have been a member here, balaji, more than long enough to realize that you should have enclosed the panel code in Code tags.

Being, however, the very exemplar of mercy and generosity, I shall overlook your gross solecism (not to mention your poor judgment in posting in the CLIST & REXX forum instead of the TSO/ISPF forum), and merely point out to you that there is, in fact, no SUBSTR function in DMS.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Fri Sep 21, 2012 8:53 pm    Post subject:
Reply with quote

A quick look in the index of the Dialog Developers Guide and Reference would have told you all you need to know about SUBSTR, or SUSTR, in the .PROC section. All these are terms that you used in your post. That quality of posting, and the fact that you did not code up your panel, and the fact that you seem incapable of looking things up yourself could lead to people ignoring your posts in future. We all have typos and spelling problems and word mis-use but try and keep it to one per post!

Just as well that I double-checked this post - 2 'd' s were missing icon_redface.gif
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Fri Sep 21, 2012 9:07 pm    Post subject: Reply to: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Use the TRUNC builtin (inbuilt) function to isolate the first 4 characters.

But I question why you only accept a single three character ID, but check for 4 characters, but allow the user to type 6 characters. If the only acceptable value is three characters, do not allow the user to type a longer value.

Aside from that, I think your input fields should be HILITE(USCORE) instead of PAD(_) because the underscores are annoying if you mistype and then want to insert a character. And you might have to account for underscore characters in your VER statement.
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Wed Sep 26, 2012 7:14 pm    Post subject: Hi
Reply with quote

Hi Pedro Vera,

Now iam handling the user id validation inside my rexx program but data are reset once i process the panel . Please find my code below and i know we need to use 'CONTROL DISPLAY SAVE' and 'CONTROL DISPLAY RESTORE' i tried it but still my values are reset .Can you please help me where i need exactly to put CONTROL DISPLAY SAVE / RESTORE' ,

Code:
ADDRESS ISPEXEC                                       
"CONTROL ERRORS RETURN"                               
'LIBDEF ISPPLIB DATASET ID('"'"AAA.TEST.PANELS"')"
'LIBDEF ISPMLIB DATASET ID('"'"AAA.TEST.MSGS"')" 
ADDRESS ISPEXEC                                       
    'DISPLAY PANEL(UTAPANEL) MSG(&ERMSG)'             
    IF RC = 0 THEN DO                                 
       CALL START                                     
       EXIT ;END                                       
    ELSE                                               
       EXIT                                           
    END                                               
/* CODE STARTS HERE */                                 
START:                                                 
IF APL = ' '                                           
THEN                                                   
   EXIT                                               
IF U   = ' '                                           
THEN                                                   
   EXIT                                               
IF R   = ' '                                           
THEN                                                   
   EXIT                                               
IF ENTRID = ' '                                       
THEN                                                   
   EXIT                                               
                                       
APPLNAME  = APL                                       
UNITTEST  = U                                         
REGRTEST  = R                                         
USER      = ENTRID                                     
IF SUBSTR(USER,1,3) ¬= 'TAM'  THEN                     
DO                                                       
   ADDRESS ISPEXEC "SETMSG MSG(PRD005)"                 
   ADDRESS ISPEXEC                                       
    'DISPLAY PANEL(UTAPANEL) MSG(&PRD00) CURSOR(ENTRID)'
END

Still will not use the Code tag - maybe these should be deleted going forward . . .
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Wed Sep 26, 2012 7:55 pm    Post subject: Reply to: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Hello,

Only been here 7 years and will Not use the code tag icon_sad.gif

d
Back to top
View user's profile Send private message
balaji81_k

New User


Joined: 29 Jun 2005
Posts: 86

PostPosted: Wed Sep 26, 2012 8:02 pm    Post subject: Reply to: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Sorry Dick
Back to top
View user's profile Send private message
Pedro

Senior Member


Joined: 01 Sep 2006
Posts: 2019
Location: Silicon Valley

PostPosted: Wed Sep 26, 2012 9:45 pm    Post subject: Reply to: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Quote:
data are reset once i process the panel

How can you tell? What does 'reset' mean? Show us the trace.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1219
Location: Israel

PostPosted: Thu Sep 27, 2012 9:50 pm    Post subject: Reply to: SUBSTR ERROR IN ISPF PANEL
Reply with quote

Nothing wrong, your program is working as designed...

1. Show the panel once,
2. Validate some fields,
3. If error in fields, terminate the program,
4. If user is not TAM, show the panel once more,
5. Terminate the program.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 1717
Location: UK

PostPosted: Fri Sep 28, 2012 3:03 am    Post subject:
Reply with quote

May be doing as designed but designed very badly - so many exits when there should only be 1.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
No new posts S922 Error yuvan ABENDS & Debugging 3 Fri Dec 02, 2016 6:58 pm
No new posts Invoke Webservice Fails with DFHPI100... divated CICS 2 Thu Nov 24, 2016 5:57 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Error IEC161I 052(009,XXXRS00)-084 wh... amitc23 JCL & VSAM 10 Wed Oct 12, 2016 5:00 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us