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
 

 

Padding in ISPF panel

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

New User


Joined: 25 Nov 2005
Posts: 44
Location: Pune

PostPosted: Mon May 14, 2007 3:30 pm    Post subject: Padding in ISPF panel
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: 2360
Location: Israel

PostPosted: Mon May 14, 2007 7:38 pm    Post subject:
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: 44
Location: Pune

PostPosted: Mon May 14, 2007 7:49 pm    Post subject: Re: Padding in ISPF panel
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: 1224
Location: Israel

PostPosted: Mon May 14, 2007 8:12 pm    Post subject:
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: 44
Location: Pune

PostPosted: Mon May 14, 2007 8:17 pm    Post subject: Re: Padding in ISPF panel
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: 1224
Location: Israel

PostPosted: Mon May 14, 2007 8:32 pm    Post subject:
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    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
This topic is locked: you cannot edit posts or make replies. Calling REXX code from ISPF panel sanchita dey TSO/ISPF 4 Mon Jan 02, 2017 5:13 pm
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 ISPF program to set SCRNAME prino TSO/ISPF 5 Fri Sep 30, 2016 2:18 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm
No new posts Rexx Panel Validation ajithajt CLIST & REXX 6 Sun Jul 17, 2016 10:50 pm


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