Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Input spanning across Lines

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> TSO/ISPF
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    Post subject: Input spanning across Lines
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 06, 2013 1:29 pm    Post subject:
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

http://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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 06, 2013 2:55 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Dec 06, 2013 6:56 pm    Post subject: Reply to: Input spanning across Lines
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: 8593
Location: Back in jolly old England

PostPosted: Fri Dec 06, 2013 7:20 pm    Post subject:
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> TSO/ISPF All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 7 Fri Dec 02, 2016 9:47 am
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Insert Lines in JCL with Rexx after a... Willy Jensen CLIST & REXX 3 Tue Aug 30, 2016 4:18 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us