Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Need information on creating dynamic Input in REXX

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
View previous topic :: :: View next topic  
Author Message
grvdeshmukh0

New User


Joined: 16 Jan 2020
Posts: 3
Location: Pune

PostPosted: Thu Jan 16, 2020 1:55 pm    Post subject: Need information on creating dynamic Input in REXX
Reply with quote

Hi,

Currently, I am working on a REXX automation and facing difficulty while generating dynamic panel based on user’s input
I want to take the number of columns as an input from the user and then based on that, panel should generate that many input fields for the user to enter column names. Can anyone please suggest how can I achieve this
Back to top
View user's profile Send private message

Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2312
Location: Hampshire, UK

PostPosted: Thu Jan 16, 2020 3:16 pm    Post subject: Reply to: Need information on creating dynamic Input in REXX
Reply with quote

What is the difficulty? What have you achieved so far?
Back to top
View user's profile Send private message
grvdeshmukh0

New User


Joined: 16 Jan 2020
Posts: 3
Location: Pune

PostPosted: Thu Jan 16, 2020 3:35 pm    Post subject: Reply to: Need information on creating dynamic Input in REXX
Reply with quote

Hi .. I have been able to create static panels wherein a user can give fix number of inputs. But my requirement is a bit different. Please refer the below example.

Please Enter no of Columns: (To be entered by user)

Then the panel should display that many input fields for the column names so that user can enter further inputs
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2312
Location: Hampshire, UK

PostPosted: Thu Jan 16, 2020 4:43 pm    Post subject: Reply to: Need information on creating dynamic Input in REXX
Reply with quote

You cannot change the layout of the currently displayed panel whilst it is being displayed. Get the information from the user then create a new panel with the requisite number of fields and display that.
Back to top
View user's profile Send private message
grvdeshmukh0

New User


Joined: 16 Jan 2020
Posts: 3
Location: Pune

PostPosted: Thu Jan 16, 2020 5:42 pm    Post subject:
Reply with quote

Thanks for the input. Do you have any example or link which I can refer to?
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 734
Location: Pennsylvania

PostPosted: Thu Jan 16, 2020 5:47 pm    Post subject:
Reply with quote

You could try this.

Create your panel with the maximum number of possible columns.
For my example lets say Nine.

Then in your INIT section, change the attributes for columns higher than the requested amount.

See an example here. Modify this for your needs.

Code:
)INIT
 IF (&COLREQ < 9)
   .ATTR(COL9) = ' TYPE(OUTPUT) INTENS(NON)'
 IF (&COLREQ < 8)
   .ATTR(COL8) = ' TYPE(OUTPUT) INTENS(NON)'
 IF (&COLREQ < 7)
   .ATTR(COL7) = ' TYPE(OUTPUT) INTENS(NON)'
Back to top
View user's profile Send private message
Marso

REXX Moderator


Joined: 13 Mar 2006
Posts: 1344
Location: Israel

PostPosted: Thu Jan 16, 2020 6:26 pm    Post subject: Reply to: Need information on creating dynamic Input in REXX
Reply with quote

Use an ISPF table:
- Define a panel with a fixed part (Enter no of Columns:) and a )MODEL part.
- Define an ISPF table with fields: seq.no, column name and other info you need.
- Display (or TBDISPL) the panel and empty table.
- Once the user enters the no of Columns, create dummy entries in the table (with only seq. no)
- TBDISPL the panel and let the user fill the empty lines with column names and so on.

Another option would be to have a panel with a fixed part (column name and other info) and a )MODEL part.
Each time the user fills the fixed part and hits ENTER, a row is added to the ISPF table and displayed in the )MODEL part, and the fixed part is cleared.
Back to top
View user's profile Send private message
Willy Jensen

Active User


Joined: 01 Sep 2015
Posts: 340
Location: Denmark

PostPosted: Thu Jan 16, 2020 9:07 pm    Post subject:
Reply with quote

Use REXX to generate the panel, write it to a temporary dataset and do a LIBDEF ISPPLIB to that dataset.
Alternatively build the panel in a REXX stem and use the ISPF panel exit ISPDPX01 found at http://harders-jensen.com/wjtech/zprograms.html to show the panel dynamically.
Back to top
View user's profile Send private message
Pedro

Senior Member


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

PostPosted: Fri Jan 17, 2020 2:17 am    Post subject: Reply to: Need information on creating dynamic Input in REXX
Reply with quote

The problem description is still not clear to me. Are you automating the creation of a DB2 table? If so, I recommend using the 'create' panels of IBM's DB2 Administration Tool. It already solves the problems you are likely to encounter. Many DB2 customers also have the DB2 Admin Tool.

If not DB2, then I agree with Marso's suggestion of using an ISPF table to get column information from the user. Though, my suggestion is for the table display to support line commands to repeat/delete/insert column information.
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 -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Error Creating KSDS file, REASON CODE... sandeep prajapati JCL & VSAM 8 Tue Mar 24, 2020 12:05 pm
No new posts IEBGENER is not Creating Member in PD... sandeep prajapati JCL & VSAM 7 Mon Mar 23, 2020 11:50 pm
No new posts Rexx STRIP Equivalent function in CLIST upendrasri CLIST & REXX 5 Mon Mar 16, 2020 9:57 pm
No new posts Execute DSNTEP2 in REXX which is call... sushanth bobby CLIST & REXX 4 Wed Mar 04, 2020 3:27 pm
No new posts Compare input date as YYMMDD with the... Khurshid_Khan SYNCSORT 5 Fri Feb 21, 2020 10:28 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us