View previous topic :: View next topic |
Author |
Message |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Tue Jun 29, 2004 8:55 am Post subject: Highlight text on ISPF panel |
|
|
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  |
|
Back to top |
|
 |
Prasam Beginner

Joined: 20 May 2004 Posts: 26 Topics: 7 Location: Illinois,USA
|
Posted: Tue Jun 29, 2004 9:52 am Post subject: |
|
|
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 |
|
 |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Tue Jun 29, 2004 10:32 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jun 29, 2004 11:16 am Post subject: |
|
|
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 |
|
 |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Tue Jun 29, 2004 11:53 am Post subject: |
|
|
Semiqeezer,
I am new to ISPF. Do you have a sample of the logic code that I can use? Thanks. |
|
Back to top |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jun 29, 2004 12:20 pm Post subject: |
|
|
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 |
|
 |
danm Intermediate
Joined: 29 Jun 2004 Posts: 170 Topics: 73
|
Posted: Tue Jun 29, 2004 3:01 pm Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Tue Jun 29, 2004 11:21 pm Post subject: |
|
|
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 |
|
 |
|
|