IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

In my panel a field is accepting 4 characters instead of one


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
veena_nagesh2002
Warnings : 1

Active User


Joined: 07 May 2005
Posts: 110
Location: hyderabad

PostPosted: Thu Nov 20, 2008 9:45 am
Reply with quote

Code:
+ ENTER HOLIDAY INDICATOR : _JHND+

ex :
Code:

ENTER HOLIDAY INDICATOR : [color=red]NNNN[/color]

when i am trying to enter value its accepting 4characters instead of one character,

q1) Is it possible to enter only one character after that it must be restricted
Q2) Is it possible to accept only characters instead of number while keying
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Nov 20, 2008 10:06 am
Reply with quote

THe field length is determined by the position of the next attribute character. If you need a one character field, use a one character variable name. Or use the ZVARS statement to map a real variable name to a Z.

You cannot restrict the typing. You can only verify the field after the user presses Enter (or PF key).
Back to top
View user's profile Send private message
Bill Dennis

Active Member


Joined: 17 Aug 2007
Posts: 562
Location: Iowa, USA

PostPosted: Thu Nov 20, 2008 8:37 pm
Reply with quote

If you want the user to only enter characters, you can test the field in the panel. ALPHAB allows A-Z and a-z
Code:
 VER (&JHND,ALPHAB)   
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1356
Location: Israel

PostPosted: Thu Nov 20, 2008 9:13 pm
Reply with quote

When you have:
Code:
)BODY
     + ENTER HOLIDAY INDICATOR : _JHND+         <= up to 4 chars
then ISPF will reserve 4 positions for the variable JHND.

You already know that if you need more, you just have to add spaces:
Code:
)BODY
     + ENTER HOLIDAY INDICATOR : _JHND    +     <= up to 8 chars


If you want to reserve less than the name of the variable, you must use the Z variable in the following way:
Code:
)BODY
     + ENTER HOLIDAY INDICATOR : _Z+            <= only 1 char

)INIT             
  .ZVARS = '(JHND)'


If you have more than one small field, you have to make sure you have as many zvars as you have Z fields:
Code:
)BODY
     + ENTER HOLIDAY INDICATOR : _Z+            <= only 1 char
     + ARE YOU SURE ? _Z+                       <= one more char

)INIT             
  .ZVARS = '(JHND RUSURE)'

[/code]
Back to top
View user's profile Send private message
View previous topic : : View next topic  
Post new topic   Reply to topic All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Identify and write records containing... SYNCSORT 11
No new posts To Unstring spaces in a field COBOL Programming 3
No new posts IBM HPU 5.2 - Converting EBCDIC Chara... DB2 0
No new posts Help required to reset decimal points... DFSORT/ICETOOL 10
No new posts Sorting Date Field DFSORT/ICETOOL 4
Search our Forums:


Back to Top