MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Highlight text on ISPF panel

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Tue Jun 29, 2004 8:55 am    Post subject: Highlight text on ISPF panel Reply with quote

I set FBal1 and TBal1 to 20 and 0 in a REXX program and want to highlight them in the ISPF panel:

+You have requested to adjust the amount from%&FBal1+to%&TBal1+.

When the panel is displayed, there are extra blanks after '20' and '0':
You have requested to adjust the amount from 20xxxx to 0xxxxxx.
where x = blank

How can I get rid of the extra blanks Question
Back to top
View user's profile Send private message
Prasam
Beginner


Joined: 20 May 2004
Posts: 26
Topics: 7
Location: Illinois,USA

PostPosted: Tue Jun 29, 2004 9:52 am    Post subject: Reply with quote

Danm,

You are getting spaces as the fields FBal1(5 characters) and TBal1(5 characters) exceeds the length of 20(2 characters) and 0(1 characters).

In this instance,you can use placeholder variable Z.the
actual name of the field is defined in the initialization section of the
panel definition.

Use of place-holders allows the definition of short fields for which the
lengths of the variable names exceed the lengths of the fields.

The names are in a name list, enclosed in parentheses if more than one name is specified, assigned to the control variable .ZVARS.

)ATTR
~ TYPE(OUTPUT) INTENS(HIGH) COLOR(RED) SKIP(ON) HILITE(REVERSE)
)BODY
+
+You have requested to adjust the amount from~Z +to~Z +.
)INIT
.ZVARS = '(FBal1,TBal1)'
)PROC
)END


Please assign the values of FBal1 and Tbal1 in REXX Routine and call the above panel.

Thanks,
Prasanth.
_________________
The struggle alone pleases us, not the victory. -Pascal,Blaise- 1623-1662, French Scientist
Back to top
View user's profile Send private message Yahoo Messenger
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Tue Jun 29, 2004 10:32 am    Post subject: Reply with quote

Prasam,

Thank you for your response. I tried your code and have this problem. If FBal1 = 1000 and TBal1 = 2000. I got:
You have requested to adjust the amount from 10 to 20 .

Now 1000 and 2000 are being truncated. The values of FBal1 and TBal1 can be from 0 to 99999.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Jun 29, 2004 11:16 am    Post subject: Reply with quote

For automatic adjustment you'll need to use a dynamic area. The logic to build it can be done directly in the panel logic.
Back to top
View user's profile Send private message Visit poster's website
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Tue Jun 29, 2004 11:53 am    Post subject: Reply with quote

Semiqeezer,

I am new to ISPF. Do you have a sample of the logic code that I can use? Thanks.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Jun 29, 2004 12:20 pm    Post subject: Reply with quote

A Google search turned up quite a few.

The basics (not tested - I haven't done this in years so it may be not quite right):

Code:
)ATTR
 @ area(dynamic)
 ! type(char) color(white)
 # type(char) color(blue)
)BODY
  example: @dyn                                                             @
)INIT
  &dyn='#You have requested to adjust the amount from!&FBal1#to!&TBal1'
)END
Back to top
View user's profile Send private message Visit poster's website
danm
Intermediate


Joined: 29 Jun 2004
Posts: 170
Topics: 73

PostPosted: Tue Jun 29, 2004 3:01 pm    Post subject: Reply with quote

Semiqeezer,

Thanks for the help. After I made minor changes, it works almost perfect:

)ATTR
@ area(dynamic)
! type(dataout) color(white)
# type(dataout) color(blue)
)BODY
@dyn @
)INIT
&dyn='#You have request to adjust the amount from!&FBal1 #to!&TBal1 #.'
)END

There is still one extra blank character since an attribute can't follow a variable name (in the ISPF document).
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Tue Jun 29, 2004 11:21 pm    Post subject: Reply with quote

Ooops. That's what I get for not being able to try it (my PC which runs my mainframe emulator was shutdown at the office and I was at home). In any event, if just using a period doesn't work, you can try two periods. Some combination of this will work. I just can't test it at the moment (again). Also, you don't really need the last attribute byte in the variable, or the 1st for that matter. But it can be a bit clearer to have them, I suppose.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group