View previous topic :: View next topic
|
Author |
Message |
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
Hello All,
I am designing a panel to get multiple lines of input. But i need to have them in the same variable instead of giving variable names for each line. I went through the following post also but , it dint work as expected. May be i am missing something.
please find the code below.
Code: |
)ATTR DEFAULT(%+_)
_ TYPE(INPUT) INTENS(HIGH) COLOR(RED) HILITE(USCORE)
@ AREA(DYNAMIC) SCROLL(OFF)
Y TYPE(CHAR) COLOR(YELLOW) HILITE(BLINK)
)BODY WINDOW(70,20)
% AUTOMATED QUERY MANIPULATION FOR A FILE
% -----------------------------------------
+
+ ENTER THE SELECT PART AND FROM PART ALONE
+ @DYNVAR,SHADVAR @
% ENTER YOUR QUERY HERE : _INPFLD1
% PRESS F3 TO EXIT
)INIT
&DYNVAR = 'SAMPLE: SELECT COLUMN1, COLUMN2 FROM TABLENAME'
&SHADVAR= 'YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY'
)END
|
the value of INPFLD1 can go for multiple lines, so as suggested in the post, the next 2 lines are starting with a blank. But still my output does not show those lines
instead if i give
Code: |
_INPFLD1
_INPFLD2
_INPFLD3
|
I have to check till which line the user has entered value and need to concatenate them into a string.
Please do help me out here.
Thanks in advance. |
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
Govarthanan,
Give it a shot after removing 'WINDOW(70,20)' from your panel. Just keep it as )BODY and see if that works. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
Back to top |
|
|
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
@TheMFKid,
I tried it, not working.
@Expat,
Instead of concatenating i thought may be this will just be a dynamic single variable. just to save the operation of concatenation.
Thanks for the link, I will refer to those materials and will post back again. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Read the link and have a play, I have just got it to work |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2546 Location: Silicon Valley
|
|
|
|
Are you using an ADDPOP? Try without it.
It is sort of a 'hardware' thing. Spanning to multiple lines only works if there are no 3270 field attributes before your intended end of the field.
ISPF inserts its own 3270 field attributes to build the box around a popup. Those field attribute characters cause an end of the input field. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Finally got it to do what I want it to do
REXX code
Code: |
/* REXX *** INVOKE AND PROCESS DYNAMIC ISPF PANEL */
"ISPEXEC CONTROL ERRORS RETURN"
D01 = '01'X
DIN = '03'X
DOY = '05'X
I = 0
DROP IX.
DO FOREVER
DYNVAR = DOY||SETSIZE('Enter something here.............',30)||DIN||,
SETSIZE('',768)||D01
"ISPEXEC DISPLAY PANEL(DYNPANEL)"
IF RC = 8 THEN LEAVE
INDATA = ''
DO WHILE POS('03'X,DYNVAR) <> 0
PARSE VAR DYNVAR . '03'X INDATA '01'X DYNVAR
IF INDATA <> '' THEN DO
I=I+1
IX.I = STRIP(INDATA)
IX.0 = I
END
END
END
IF IX.0 > 0 THEN DO
DO AA = 1 TO IX.0
SAY IX.AA
END
END
EXIT
SETSIZE: PROCEDURE
PARSE ARG IN , L
IF LENGTH(IN) < L THEN RETURN LEFT(IN,L)
RETURN LEFT(IN||COPIES(' ',L),L) |
Panel code
Code: |
)ATTR DEFAULT(%+\)
$ AREA(DYNAMIC) SCROLL(ON) EXTEND(ON)
01 TYPE(DATAOUT) INTENS(LOW)
02 TYPE(DATAOUT) INTENS(HIGH)
03 TYPE(DATAIN) INTENS(LOW) COLOR(GREEN) PAD(_)
04 TYPE(DATAOUT) INTENS(LOW) COLOR(RED)
05 TYPE(DATAOUT) INTENS(LOW) COLOR(YELLOW)
)BODY EXPAND(@@)
+@ @ISPF Dynamic Panel @ @
+
%COMMAND ===>\ZCMD +
+
+ Blah Blah Blah ........... instructions and stuff like that
+ continued
+
+
+ ................................................. finally FINISHED
+
$DYNVAR $
+
)INIT
.CURSOR=DYNVAR
.CSRPOS=33
)PROC
&PFKEY=.PFKEY
)END |
|
|
Back to top |
|
|
TheMFKid
New User
Joined: 20 Nov 2013 Posts: 91 Location: India
|
|
|
|
As Pedro suggested, try without ADDPOP and also without 'WINDOW(70,20)' in your panel. |
|
Back to top |
|
|
Govarthanan
New User
Joined: 22 Nov 2013 Posts: 10 Location: India
|
|
|
|
Thanks all. It did work as everyone suggested.
@Pedro & @MFKid,
After removing ADDPOP and WINDOW parameters, the code worked as expected.
@Expat,
Thanks for guiding me to the manuals, i was also able to create a scrollable length field in the same line.
I have got few other doubts too, so i ll be posting soon |
|
Back to top |
|
|
|