×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • 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!

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

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

terminate edit session and edit again

terminate edit session and edit again

terminate edit session and edit again

(OP)
Can someone please help me with the following:

I am in an edit session on PDS(MEM)
I key my macro command - MAC1

MAC1 does
.
.
.
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"

ALLOC FI(F1) DA(PDS(MEM)
ALLOC FI...
"CALL *(PGM1)"   /* this works fine */

Pgm1 will make changes to PDS(MEM)

I then want to do something like:
ADDRESS ISPEXEC "EDIT DATASET('PDS(MEM)')"

The problem is that at this point I get
**********************************************************
* ISRE093                                                *
*                                                        *
*Member in use                                           *
* Member is being updated by you or another user.        *


... the user is me.


I have tried many different scenarios:
FREE
LMCLOSE
etc

RE: terminate edit session and edit again


When PGM1 opens the data for output it gets an exclusive enqueue.  You must release that enqueue.  Unfortunately, the way ISPF sometimes manages enqueues you may be required to exit ISPF, not just EDIT, and not just your MACRO.
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: terminate edit session and edit again

(OP)
OK.  Forget about pgm1.

I want the macro to:
ISREDIT "END" to end my interactive edit session from which I initiated the macro.

Then I want the macro to:
ADDRESS ISPEXEC "EDIT DATASET('PDS(MEM)')" put me back in edit on the same pds member from which I started.

Can I not do this?
 

RE: terminate edit session and edit again

I'm confused.

You started your 'edit session' via

CODE

address ISPEXEC "EDIT ....  MACRO(MAC1)"
Right?   

When MAC1 finishes it issues

CODE

address ISREDIT "END"
and control returns to the REXX exec.  Then you

CODE

address TSO
"ALLOC FI(TMP) DA(...) "
"CALL *(PGM1)"
"FREE  FI(TMP)"
and control again returns to the REXX exec.  When you

CODE

address ISPEXEC "EDIT ....  MACRO(MAC2)"
it blows up.

Is that correct?
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: terminate edit session and edit again

(OP)
I start out in an edit session in PDS(MEM).  I get there by going to option 2 via the IPSF Primary Option Menu.

I then execute the macro by keying MAC1 on the command line.

The MAC1 macro will do:
ADDRESS ISREDIT "SAVE"
ADDRESS ISREDIT "END"

This will "END" the interactive edit session of the PDS member.  The macro then does

ADDRESS ISPEXEC "EDIT DATASET('PDS(MEM)')"

This is when I get the error.  So, I suspect that the enqueue that you mentioned yesterday remains even after the
ADDRESS ISREDIT "END" .

My thought is that upon the "END", a DEQ should be done to "free" the PDS(MEM) so that the "EDIT DATASET..." will work.  
 


 

RE: terminate edit session and edit again

Quote (mikerexx):

ADDRESS ISREDIT "END"

This will "END" the interactive edit session of the PDS member.  The macro then does...

Whatever it does then is certainly 'undefined'.  The MACRO environment is only valid within an EDIT session.  When you end the EDIT session, you're done as far as any macro is concerned.

Now if you have an umbrella REXX exec which cranks EDIT and runs a MACRO (which does not "END", just 'return'), then you have the opportunity to do other things afterwards such as running a second macro.
 

Frank Clarke
--America's source for adverse opinions since 1943.

RE: terminate edit session and edit again

(OP)
I thought the same thing at first.  But I ran the macro anyway.  It appears to be still alive after the "END".  

But maybe since the "enq" is still active as you have indicated, the macro can still operate.  In other words the "END" hasnt really completed and done a "deq" until the macro is finished.  If this is true then I cannot have a macro do something to a pds member having initiated from that pds member.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

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! Already a Member? Login


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