View previous topic :: View next topic
|
Author |
Message |
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
I need a sample code for creating a panel which can take user input run a routine at the back end and shows the output on the screen.
I have not created panel screens before can any one help me providing right doc for learning this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
From an empty member in an ISPPLIB PDS, start with one of the simple ISPF Edit Models for panels.
From the MODEL command, try the option:
Panel Formats:
F0 PANFORM
and then from the Panel Formats, a good choice is:
F1 ENTRY - Data entry |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Or go to the CLIST & REXX forum and click on the sticky which has reference materials / manuals or the like in the title and go read some manuals. |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
My requirement is like i need to capture program name and table name from panel screen and execute the below routine and show the out put dataset on the screen.
The output is constant 12 lines.
Can any one help me in giving a sample code..Such that if i enter the program name and table name on the panel the rexx routine should run in the back end and the out put dataset generated should be shown on the panel.
Iam not including the entire EXEC D1 and D2 are the variables user needs to enter.
OUT is the output dataset which i need to show on the panel which has 12 lines always.
/********************REXX**************/
SAY 'ENTER THE PROGRAM NAME TO BE SEARCHED OR THE INITIAL LETTERS OF'
SAY 'THE PROGRAMS TO BE SEARCHED'
PULL D1
SAY 'ENTER THE CREATOR NAME'
PULL D2
NUM = WORDLENGTH(D1,1)
PDS = GIO.END.GPROD.COBOL
A = OUTTRAP(MEM.)
"LISTDS '"PDS"' MEMBERS"
A = OUTTRAP('OFF')
XXXXX
XXXXXX
"ALLOC DA('"OUT"') F(OUTDD) SHR REUSE"
"EXECIO * DISKW OUTDD (STEM VAR3. FINIS"
"FREE F(OUTDD)"
RETURN
*************end*********** |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Just to be clear, do you need help with the panel code or with the calling program code, or is it both? Were you at least able to create a basic functional panel definition from the ISPF Edit Models? |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
I Need help for both...I have not created a panel so far |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Of course you need help for both! But this is not 'do it for me' forum.
Please follow the instructions in Kevin's first reply to get a model panel.
If you need more examples, look in to your standard ISPPLIB libraries allocated at your site. Talk to your peers to find if you can add your elements to these libraries or you can add your personal panel library to the stack.
If you at least show you are trying, you can hope for some further help.
Good luck. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Start with the F1 ENTRY - Data entry ISPF Edit Model that I mentioned earlier. It would be a good idea before designing your panel to know how many fields you'll need, and what kind they are (input or output), what sort of values they should contain, and whether or not you want to allow an input field to be blank. You need to assign a unique variable name to each field so you can associate them to your program variables.
Here's a good previous topic that you might want to use as a starting point. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Read the Primer and do all the exercises, then try to write your panel and program.
Then come back here when you have a specific problem. |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
Thank you i will go through the docs and the link..
Will get back if i face any problem |
|
Back to top |
|
|
Kranthi_Merigala
New User
Joined: 22 Mar 2010 Posts: 17 Location: Hartford
|
|
|
|
Iam able to create the panel
Code: |
-------------------- panel1 ----------------------------------
COMMAND ===>
ENTER THE PROGRAM NAME: _______________________________________________________
ENTER THE TABLE NAME : _______________________________________________________
|
Used the below declaration while defining the panel
%ENTER THE PROGRAM NAME:$XXXXXX
%ENTER THE TABLE NAME :$YYY
I have tried using Pull for capturing the values i entered.
Its not working where exactly the values we are entering are stored.
or how to capture them. |
|
Back to top |
|
|
valyk
Active User
Joined: 16 Apr 2008 Posts: 104 Location: South Carolina
|
|
|
|
When developing ISPF panels, you will become very dependant on the Dialog Test facility in ISPF. I believe by default it is option 7 on the primary option menu.
Whenever you invoke the facility you will want to select option '2. Panels', and enter your panel name. This will allow you to test your panel. If you have any issues, the facility will notify you and display a message.
Try something like this:
Code: |
)ATTR FORMAT(MIX)
% TYPE(DT) SKIP(ON)
+ TYPE(SI)
_ TYPE(INPUT) COLOR(BLUE)
# TYPE(OUTPUT) COLOR(RED)
)BODY
%ENTER THE PROGRAM NAME:_PROGRAM
%ENTER THE TABLE NAME :_TABLE
)END |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Quote: |
I have tried using Pull for capturing the values i entered.
Its not working where exactly the values we are entering are stored.
or how to capture them.
|
Just use the same variable name in both places: panel and rexx program. They work well together. |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Quote: |
I have tried using Pull for capturing the values i entered. |
Oh, dear! You still have much to learn...
You have to limit the input fields (PROGRAM should be no more than 8 characters for example).
In the )PROC section of the panel definition, you can add basic data validation (mandatory field, valid program name, etc).
And, in your case, don't use PULL.
Panel variables are directly available to the rexx program (just as rexx variables are available to the panel). |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
When developing ISPF panels, you will become very dependant on the Dialog Test facility in ISPF. I believe by default it is option 7 on the primary option menu.
|
Valyk, You may be better to say 'you may want to use' the facility.
I hardly think they would be 'dependant' on it.
I say this because, I have written hundreds of panels, and never once used this. In fact, I do not know what PDS this facility is attached to at our shop.
Additionally, this would not have helped in her case. The panel was fine, the REXX was in error. |
|
Back to top |
|
|
Ronald Burr
Active User
Joined: 22 Oct 2009 Posts: 293 Location: U.S.A.
|
|
|
|
The facility is not called the PANEL test facility, it is called the DIALOG test facility - because it is not designed to ONLY test PANELs. Sure, a part of the facility CAN be used to display and test a panel in isolation from the rest of a dialog, but the TRACE facilities available for dialog testing can be set to report/trace commands, dialog functions, dialog variable usage, profile pools, table commands, PFKeys, etc.
Not saying that everyone/anyone WILL become dependent on it, but it CAN be handy when attempting to debug a dialog. |
|
Back to top |
|
|
|