IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Input spanning across Lines


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Govarthanan

New User


Joined: 22 Nov 2013
Posts: 10
Location: India

PostPosted: Fri Dec 06, 2013 1:01 pm
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Fri Dec 06, 2013 1:28 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 06, 2013 1:29 pm
Reply with quote

Why not concatenate the variables used in the panel into one long variable within the REXX or whatever code ?

Code:

SELECT _VAR1
FROM   _VAR2
.
.
.
VAR3 = VAR1||VAR2


Or take a read of this

davideellis.wordpress.com/2013/04/19/dynanic-ispf-panels/
Back to top
View user's profile Send private message
Govarthanan

New User


Joined: 22 Nov 2013
Posts: 10
Location: India

PostPosted: Fri Dec 06, 2013 2:54 pm
Reply with quote

@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. icon_biggrin.gif

Thanks for the link, I will refer to those materials and will post back again.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 06, 2013 2:55 pm
Reply with quote

Read the link and have a play, I have just got it to work icon_biggrin.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2546
Location: Silicon Valley

PostPosted: Fri Dec 06, 2013 6:56 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Dec 06, 2013 7:20 pm
Reply with quote

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
View user's profile Send private message
TheMFKid

New User


Joined: 20 Nov 2013
Posts: 91
Location: India

PostPosted: Sat Dec 07, 2013 10:40 am
Reply with quote

As Pedro suggested, try without ADDPOP and also without 'WINDOW(70,20)' in your panel.
Back to top
View user's profile Send private message
Govarthanan

New User


Joined: 22 Nov 2013
Posts: 10
Location: India

PostPosted: Mon Dec 09, 2013 1:10 pm
Reply with quote

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 icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts force tablespace using LISTDEF input DB2 1
No new posts Two input files & writing counter... DFSORT/ICETOOL 12
No new posts Use input file with OMIT rcd keys? DFSORT/ICETOOL 15
No new posts replace word 'MONTH' with current mon... SYNCSORT 11
Search our Forums:

Back to Top