Automatic assigning of current DSN as ISPPLIB for ISPF panel



IBM's Command List programming language & Restructured Extended Executor

Automatic assigning of current DSN as ISPPLIB for ISPF panel

Postby riya_kottoor » Fri Sep 29, 2017 12:25 pm

Hello..
I am using ISPF panels in one of my projects. I was hardcoding the DSN as the ISPPLIB using the statement,
"ISPEXEC LIBDEF ISPPLIB DATASET ID ('HLQ.DSN')".
It was working fine. But now I need to remove the hardcoding of the DSN such that the REXX code should automatically take the current DSN name. I tried using the ISREDIT statement,
"ISREDIT (DSN) = DSN"
and use the variable DSN instead of 'HLQ.DSN'. But it is not working. Please suggest any way to resolve this issue.
riya_kottoor
 
Posts: 19
Joined: Thu Sep 21, 2017 11:58 am
Has thanked: 1 time
Been thanked: 0 time

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby enrico-sorichetti » Fri Sep 29, 2017 12:52 pm

...such that the REXX code should automatically take the current DSN name...


define current please !
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby willy jensen » Fri Sep 29, 2017 1:19 pm

But it is not working

What error messages do you see? Hint: show the ZERRLM variable after a failed ISPF function call. Might you be missing the quotes?
I am doing something similar in one of my programs and it works for me.
You are of course it running as an edit macro since you try to use an edit macro command?
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby riya_kottoor » Fri Sep 29, 2017 4:09 pm

By current DSN, I meant the dataset in which the panel description is kept. Any approaches for this need?
riya_kottoor
 
Posts: 19
Joined: Thu Sep 21, 2017 11:58 am
Has thanked: 1 time
Been thanked: 0 time

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby riya_kottoor » Fri Sep 29, 2017 4:12 pm

willy jensen wrote:
But it is not working

You are of course it running as an edit macro since you try to use an edit macro command?

Oh..!! It is not running as an edit macro. That's why the ISREDIT command didn't work...
riya_kottoor
 
Posts: 19
Joined: Thu Sep 21, 2017 11:58 am
Has thanked: 1 time
Been thanked: 0 time

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby willy jensen » Fri Sep 29, 2017 4:59 pm

Depending on how the program is called, the REXX 'PARSE SOURCE' command might provide the info. How is the program started? If it is started by another program, then that program could pass the info?
willy jensen
 
Posts: 455
Joined: Thu Mar 10, 2016 5:03 pm
Has thanked: 0 time
Been thanked: 69 times

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby enrico-sorichetti » Fri Sep 29, 2017 5:37 pm

By current DSN, I meant the dataset in which the panel description is kept


it is obvious that You need to allocate to ISPPLIB the dataset that contains the panel

again how the dataset that contains the panel becomes current ?
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby riya_kottoor » Wed Oct 04, 2017 11:54 am

enrico-sorichetti wrote:
it is obvious that You need to allocate to ISPPLIB the dataset that contains the panel


I want to avoid the hard coding of DSN in the statement,
"ISPEXEC LIBDEF ISPPLIB DATASET ID('HLQ.DSN')",
such that if someone else copies the code to their PDS, they need not edit anything in the code manually. Instead, the HLQ.DSN should get replaced with the PDS name in which the other person have kept the code.

Is it possible?
riya_kottoor
 
Posts: 19
Joined: Thu Sep 21, 2017 11:58 am
Has thanked: 1 time
Been thanked: 0 time

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby enrico-sorichetti » Wed Oct 04, 2017 12:04 pm

asking again how does the dataset that contains the panel become current ?
if You can describe the above logic, You should be able to reproduce it with some code
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: Automatic assigning of current DSN as ISPPLIB for ISPF p

Postby Pedro » Wed Oct 04, 2017 9:43 pm

The poster's scenario is not clear. Based on the examples, I think he wants to use the data set currently being edited as the ISPPLIB data set. This approach is not good in a general case because most of the application users will not be editing the panel data set.

Starting an application is non-trivial. There are different approaches:
1. Make the installer (a person) customize the startup exec with the correct high-level qualifiers
2. Pass in the high-level qualifier as a parameter to the startup exec. For example, the installer would modify your local tool menu panel with the correct call to the startup exec,including the high level qualifier. The onus is still on the installer.
3. As stated earlier, try using PARSE SOURCE to determine the origin of the startup program and assume it is the same high level qualifier for all related data sets.
4. Just copy the application contents to system default data sets... you do not need to use LIBDEF statements.
Pedro Vera
User avatar
Pedro
 
Posts: 684
Joined: Thu Jul 31, 2008 9:59 pm
Location: Silicon Valley
Has thanked: 0 time
Been thanked: 53 times

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post