View previous topic :: View next topic |
Author |
Message |
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Thu Mar 09, 2006 6:37 am Post subject: ISPF PANEL help |
|
|
Hi
Can anyone please give me a solution for this..I have a field in my panel of length say 15.I have to get that field value from user and substitute it in a corresponding variable in skeleton file.I am able to do that.
The scenario is:
If the user fills only 5 chars out of 15 in the field,then my corresponding skeleton variable is also capturing only those 5 chars and its not showing up the remaining 10 unfilled chars.What i thought was the rest 10 will be shownup as spaces(as i had initialised the field with spaces in my panel) in my skeleton variable which is what i need.I dont know how to go about it, whether anything can done in PANEL or in my skeleton file or in my REXX code...
I tried using the attribute JUST (RIGHT) PAD (' ') in my panel which preserves the trailing pad characters for the input field but of no use.If anyone have any info on that please share with me.Hope i am clear.
Thanks |
|
Back to top |
|
|
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Thu Mar 09, 2006 8:55 am Post subject: |
|
|
According to the fine manual, trailing blanks are always stripped from the value before the variable is filled in the skeleton.
O.
________
Honda Ridgeline history
Last edited by ofer71 on Sat Feb 05, 2011 11:35 am; edited 1 time in total |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Thu Mar 09, 2006 10:27 am Post subject: |
|
|
You need to post some of your code, so we can better understand your problem.
What does your skeleton look like? Please show a print of the required output record. _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Thu Mar 09, 2006 10:52 am Post subject: |
|
|
PANEL CODE
__________
Code: |
)ATTR DEFAULT(%+_)
% TYPE(TEXT) INTENS(HIGH) COLOR(YELLOW)
+ TYPE(TEXT) INTENS(LOW) SKIP(ON)
_ TYPE(INPUT) INTENS(HIGH) COLOR(GREEN) JUST(RIGHT) PAD(' ')
)BODY
% ENTER THE CODE : _Z +
)INIT
.ZVARS='(CODE)'
&CODE=' '
)PROC
VER(&CODE,NB,MIX)
)END
REXX CODE
_________
/*rexx*/
arg code
"ispexec libdef ispplib dataset id('userid.clist')"
"ispexec libdef ispslib dataset id('userid.sample.skel3')"
"ispexec display panel(expanel)"
"ispexec ftopen temp "
"ispexec ftincl exskel"
"ispexec ftclose"
"ispexec vget (ZTEMPF) shared"
do
"alloc f(in) dsn('"ztempf"') shr"
"alloc f(out) dsn('"userid.file"') mod reuse"
"execio * diskr in (stem in. finis"
"execio * diskw out (stem in. finis"
"free f(in out)"
end
|
SKELETON FILE
_____________
999999XOP*XTE*x&CODE+999999999
Its here in the skeleton, i have to substitute the value obtained from the panel above. say if the field length is 15 and the user types just five characters,What i desired was those five characters along with the remaining 10 unfilled chars(blanks here) shud be replaced in the skeleton file variable.But its capturing only those 5 typed chars.Please tell me if there is a possible solution for this.
Hope i am clear..
Thanks |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
|
Back to top |
|
|
German Castillo Beginner
Joined: 23 Dec 2005 Posts: 83 Topics: 2 Location: Caracas, Venezuela
|
Posted: Fri Mar 10, 2006 9:30 am Post subject: |
|
|
Hello mask-of-zorro,
Try this:
mask-of-zorro wrote: |
Code: |
...
"ispexec display panel(expanel)"
Code = Left(Code, 15, ' ')
"ispexec ftopen temp "
...
|
|
_________________ Best wishes,
German Castillo |
|
Back to top |
|
|
mask-of-zorro Beginner
Joined: 19 Nov 2005 Posts: 23 Topics: 10
|
Posted: Fri Mar 10, 2006 12:17 pm Post subject: |
|
|
Thanks a lot Mervyn & German Castillo.Your solution solved my problem.Actually,when you suggested the solution before,i cudn't get much..but now i have understood..
thanks |
|
Back to top |
|
|
|
|