Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login




Remember Me
Forgot Password?
Join Us!

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Donate Today!

Do you enjoy these
technical forums?
Donate Today! Click Here

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Link To This Forum!

Partner Button
Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

How to invoke ISPEXEC EDIT without displaying the panelsHelpful Member! 

trlowe (Programmer)
26 Jul 06 13:24
I have been searching for this answer and decided to just ask. I have a REXX exec that I am using to process every member of a PDS to do search and replace. However, when I invoke the EDIT command so I can run the edit macros (and change commands) the EDIT panel shows and waits until I press PF3 to exit. I want to EDIT behind the scenes without the panel being displayed. Can someone tell me how? Nothing I have tried works.

ADDRESS ISPEXEC "CONTROL NONDISPL"
ADDRESS ISPEXEC "EDIT DATAID("FILEID") MEMBER("MEMBER")"
IF RC = 0 THEN
   DO
      SAY editting MEMBER
      address ispexec "ISREDIT FIND ' JOB '"
. . .
Helpful Member!  DProv (Programmer)
26 Jul 06 15:34
Make sure you specify an EDIT MACRO in your "EDIT DATAID..." Like

Address ISPEXEC "EDIT DATAID("FILEID") MEMBER("MEMBER") MACRO("macname")"
 
After you've done all your changes, the macro should contain either a:
Address ISREDIT "END" /*To save the changes */
or
Address ISREDIT "CANCEL" /*to cancel the changes */

Hope this helps.

Denis
 
DProv (Programmer)
26 Jul 06 15:42
Forgot to mention, the MACRO you call is actually another REXX program.

You put all your ISREDIT commands in there.

Denis
trlowe (Programmer)
26 Jul 06 16:38
Thanks DProv.

I have the macro name in there as you suggest and that part is working. What I would like to do though is have the member be editted with the macro but without the EDIT session being seen on the screen by the user. Basically behind the scenes. Can you tell me how to accomplish that? Thanks again.
 
DProv (Programmer)
26 Jul 06 17:00
Macname is just a name...Like I said, this is another REXX pgm.

"macname" could look like this :

/* REXX */
Address ISREDIT "MACRO (PARM)"
Address ISPEXEC "CONTROL ERRORS RETURN"

address ispexec "ISREDIT FIND ' JOB '"
etc...
Address ISREDIT "END"  /* to save the member */
exit
/* end of macro */

The ISREDIT "END" statement will cause your edit screen not to be shown.

Are you using LMINIT/LMOPEN and LMMLIST services to process each member?
trlowe (Programmer)
27 Jul 06 9:43

>>Are you using LMINIT/LMOPEN and LMMLIST services to process each member?<<

Yes. I am by no means an expert in REXX and I found a sample online that had that logic in it and I just made my changes around it. I would suspect there are better ways to loop through the PDS directory and do change commands on each one (or only selected ones) but I don't know it. I have seen some that use an EXECIO command but I have never used that one. I VERY open to suggestions from you guys.

Terry
DProv (Programmer)
27 Jul 06 10:38
Using LM functions and EDIT macros allow you to issue ISPF edit commands like FIND CHANGE etc... you can also use EXECIO to edit any dataset but your code will be completely different.

Can you list both programs? THis will give me a better idea of what's not working.



BTW, I made a slight mistake:


Address ISPEXEC "EDIT DATAID("FILEID") MEMBER("MEMBER") MACRO("macname")"
should read:
Address ISPEXEC "EDIT DATAID("FILEID") MEMBER("MEMBER") MACRO(macname)"
iadithot (Programmer)
31 Jul 06 18:15
I to am having problems with a similar program & macro.  The list panel displays and I have to make a selection after the LMLIST statement before the macro is even called.

Here is the basic code:
/* REXX PROGRAM  EDITPDS                             */
DATASET = "my.pds.dataset"
ADDRESS 'ISPEXEC'
"LMINIT DATAID(INPUTDD) DATASET('"DATASET"') ENQ(SHRW)"
"LMOPEN DATAID("INPUTDD") OPTION(INPUT)"

MBR = ' '
SAVERC = 0

DO WHILE (SAVERC = 0) & (ENDNOW \= 'Y')
   "LMMLIST DATAID("INPUTDD") MEMBER("MBR") OPTION(LIST) STATS (NO)"
   SAVERC = RC

  SAY "CALLING CHGALL MACRO"                            
  "EDIT DATAID("INPUTDD") MEMBER("MBR") MACRO(CHGALL)"
   /* while testing - ensure an exit to the loop */
   SAY "TYPE 'Y' TO QUIT"   
   PULL ENDNOW
END  /* end do */
"LMCLOSE DATAID("INPUTDD")"
"LMFREE DATAID("INPUTDD")"  



/* REXX MACRO PROGRAM   CHGALL                    */
SAY "CHGALL MACRO ENTERED"
"ISREDIT MACRO PROCESS"
"ISREDIT X ALL"
"ISREDIT C 'BN' 'B1' FIRST"
"ISREDIT END"  
ADDRESS 'ISPEXEC'
RETURN        



I get the "CALLING CHGALL MACRO" message and then a List Panel comes up.  Once I exit from the List Panel then the macro starts and I get the "CHGALL MACRO ENTERED" message.

I just want to step through each member of the PDS running the change macro against each member without having any Panels appear.  What am I doing wrong?  Any help would be very greatly appreciated.

Kirby
DProv (Programmer)
1 Aug 06 17:56
All you have to do is remove the double quotes around MBR on your LMMLIST statement  

"LMMLIST DATAID("INPUTDD") MEMBER("MBR") OPTION(LIST) STATS (NO)"

Should be
"LMMLIST DATAID("INPUTDD") MEMBER(MBR) OPTION(LIST) STATS (NO)"

Hope this helps
iadithot (Programmer)
2 Aug 06 10:44
That was the problem.  Now it works like a champ.

Thanks DProv!!  
trlowe (Programmer)
3 Aug 06 9:52
Thanks for the help DProv. I love talking to smart people.

Mine is working as it should now. I think I will expand it now to display the member list and allow the user to select from the list and then process those members. Also, I may try the EXECIO so I can have a little bit more control over the changes instead of using an edit macro. Do you know of any code samples you could recommend that might help me?

Oh if only I could get the boss to buy File-Aid!!!!!!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close