|
|
| Author |
Message |
JOYEETA PAUL Warnings : 1 New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
| i want to use a loop in ispf panel to read records from a ps file. can anybody help me to give some examples? |
|
| Back to top |
|
 |
References
|
|
 |
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 3509 Location: Brussels once more ...
|
|
|
|
Please explain what you really want to do,
And why do you think that a panel will read the data ?
What is wrong with EXECIO ? |
|
| Back to top |
|
 |
genesis786
Active User
Joined: 28 Sep 2005 Posts: 88 Location: London
|
|
|
|
I think joyeeta paul wants to understand how to work with page up page down on a panel?
if yes.. then u need to use tables to display multiple page records in a panel.. table (tbcreate, tbadd, tbbottom, tbdispl etc..) will take care of page up page down...
let us know if this is ur doubt!! |
|
| Back to top |
|
 |
JOYEETA PAUL Warnings : 1 New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
| ya i know the EXECIO command.i used that one in my rexx prog.but i want to see file records in a panel. actually i have one ps file with more than 1 line of records. now i want to display the records in a panel .so i need a loop to read the records one by one from the file.there will be a limit i.e. end of file. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3265 Location: Charlotte,NC USA
|
|
|
|
So, you want to:
Read a record.
Display that record in a panel.
Presumably, wait for some user input, then move on or exit out.
Display the next record.
Continue on until EOF.
Is that about it? |
|
| Back to top |
|
 |
JOYEETA PAUL Warnings : 1 New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
| no, all records will in same panel.all records will be displaying in the same panel line by line until end of file.this line by line thing should be in a loop as we use in EXECIO. |
|
| Back to top |
|
 |
ofer71
Global Moderator
Joined: 27 Dec 2005 Posts: 1930 Location: Israel
|
|
|
|
You can't read records within ISPF panel (unless you use EXECIO within *REXX within the panel, which is silly).
A dataset can be read using some programming language (to include REXX), and then its content is saved in variables. Then, you may use ISPF panel to display these variables.
o. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3265 Location: Charlotte,NC USA
|
|
|
|
| I'm probably not the only one confused here. genesis786 has already mentioned using an ISPF Table and storing the records that way, then using a TBDISPL service to display the table in a panel. I'm puzzled as to why you wouldn't just use a BROWSE or EDIT, with or without a panel. |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3265 Location: Charlotte,NC USA
|
|
|
|
| Otherwise, the only other option I can think of is a panel that uses a dynamic area. |
|
| Back to top |
|
 |
Pedro
Senior Member
Joined: 01 Sep 2006 Posts: 510 Location: work
|
|
|
|
Normally, you would just want to browse the dataset. Done!
But some datasets have records that are not best for browsing. The easiest is to read your raw data, convert / format into readable records and make a new report dataset and browse that. Still fairly simple. But you loop through your many records and processing them and when done, then do a single display.
Already suggested as a table display. You loop through your many records and processing them and when done, then do a single display. It is not clear why you want the display within a loop.
You can use the BRIF service (browse interface) to browse through your data, but much more complicated because you have to provide some assembler exits. |
|
| Back to top |
|
 |
JOYEETA PAUL Warnings : 1 New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
| how can i use a dynamic area in a panel? can you pls explain it with examples? |
|
| Back to top |
|
 |
genesis786
Active User
Joined: 28 Sep 2005 Posts: 88 Location: London
|
|
| Back to top |
|
 |
genesis786
Active User
Joined: 28 Sep 2005 Posts: 88 Location: London
|
|
|
|
Using tables you can do something like this:
This is MYPANEL
| Code: |
)BODY EXPAND(\\)
+%DATE: ^ZDAT @ +
+%TIME: ^ZTIM @MY PANEL+ ^ZRGN %USER: ^ZUSR
%CMD+==> _ZCMD %SCROLL+==>
%Env: _Z+ %Country: _Z +%File: _Z %Key: _Z
+-Frm-to------LEVEL/FIELD NAME-------FORMAT----DATA---------------------
)MODEL
# rec /*This is your variable which will be formed in table */
)INIT
.ZVARS = '(ZENV ZCTY ZFLE ZKEY)'
&PFKEY = ' '
)PROC
&PFKEY=.PFKEY
)END
|
And you can exploit this using following rexx statements after making some modifications:
| Code: |
address ispexec"display panel(MYPANEL)"
do while pfkey ^= 'PF03'
. /* do ur validations etc... */
.
tbkey = '(rec)'
"ispexec tbcreate outdata keys "tbkey" nowrite"
do i = 2 to layout.0 /* layout will have ur file records... */
rec = strip(layout.i,'T',' ')
"ispexec tbadd outdata"
"ispexec tbbottom" outdata
end
"ispexec tbtop" outdata
do forever
"ispexec tbdispl outdata panel(MYPANEL)"
lc = rc
if lc ^= 0 then leave
end
"ispexec tbend" outdata
rec = ''
end
.
.
.
|
So when you display the panel, you can simply do your PF7 PF8 etc until PF3... |
|
| Back to top |
|
 |
JOYEETA PAUL Warnings : 1 New User
Joined: 18 Sep 2008 Posts: 17 Location: bangalore
|
|
|
|
actually my file is holding some pieces of code.if i select a certain condition the corresponding piece of code will be displaying in the panel.the code has more that one line.
here i think i can't use a table format. is there any other way to display the rec(code) in a panel? can anybody suggest me? |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8643 Location: 221 B Baker St
|
|
|
|
Hello,
| Quote: |
| can anybody suggest me? |
Not until we understand more clearly what you want to do. Keep in mind that your requirement is completely clear to you, but is not to others.
If may help if you can post a couple of examples of what you want to do/see on the panel. Use the Reply editor and the "Code" tg to prepare your samples. Use Preview to see how your post will appear to the forum (rather than how it appears in the reply editor). When you are satisfied with the appearance, Submit (do not forget to Submit or your work is gone ). |
|
| Back to top |
|
 |
|
|