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

Padding in ISPF panel


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

New User


Joined: 25 Nov 2005
Posts: 49
Location: Pune

PostPosted: Mon May 14, 2007 3:30 pm
Reply with quote

Hi

can any body explain me how to do padding in ispf panel. I want the last unfilled bytes of the variable field of my panel to be padded with spaces.

Ex: i have two fields name(15) and city(10) and if user entres the like this:

name : james bond(i.e. 9 + 1 space in between=10 chars)
city : london

then I want output like:
"james bond5spaceslondon4spaces"i.e. total 25 chars

and not like :
"james bondlondon"
Back to top
View user's profile Send private message
ofer71

Global Moderator


Joined: 27 Dec 2005
Posts: 2358
Location: Israel

PostPosted: Mon May 14, 2007 7:38 pm
Reply with quote

Use PAD(' ') in your attributes section.

O.
Back to top
View user's profile Send private message
prashantshinde

New User


Joined: 25 Nov 2005
Posts: 49
Location: Pune

PostPosted: Mon May 14, 2007 7:49 pm
Reply with quote

Ofer

I checked with PAD(' '). But it is not working icon_sad.gif
still I am getting the vlues entered as conncatnating with previous field's values.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon May 14, 2007 8:12 pm
Reply with quote

When you specify PAD('_'), you can see the underscores in the panel but you don't receive them in the variables.
Similarly, with PAD(' ') you will "see" the spaces but won't receive them.

In the rexx that displays the panel, I would do:
Code:
OutData = Left(name,15)||Left(city,10)
Back to top
View user's profile Send private message
prashantshinde

New User


Joined: 25 Nov 2005
Posts: 49
Location: Pune

PostPosted: Mon May 14, 2007 8:17 pm
Reply with quote

Marso

YOu got it right. I can see spaces or '_' in the panel but do not get it in variable's output values. And I want same thing , in the variable's output.

Please give me suggestion for CLIST only as I am not using REXX.

Thanks.
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1353
Location: Israel

PostPosted: Mon May 14, 2007 8:32 pm
Reply with quote

I have found another way. In the panel:
Code:
)PROC                               
   &name = '&name.               '    add 15 spaces after whatever was entered in the name field
   &name = trunc(&name,15)            cut all the extra spaces on the right to reach a size of 15
   &city = '&city.          '         add 10 spaces after whatever was entered in the city field
   &city = trunc(&city,10)            cut all the extra spaces on the right to reach a size of 10
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
No new posts Looking for a little history of ISPF ... TSO/ISPF 5
No new posts Adding QMF and SPUFI to the ISPF menu DB2 20
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
No new posts Call program, directly from panel CLIST & REXX 9
Search our Forums:

Back to Top