We don't have this type of problem using PI/Open flavour - something to do
with EXECUTE being run in a different process space under other flavours.

Have a look at the PASSLIST keyword that can be used with EXECUTE.

Something like:

READLIST ID.LIST
   ELSE STOP
EXECUTE "ED filename " PASSLIST ID.LIST

AdrianW

-----Original Message-----
From: John Hester [mailto:[EMAIL PROTECTED]
Sent: Tuesday, 27 April 2004 05:22
To: U2 Users Discussion List
Subject: [UV] Problem reactivating select list


I wrote a wrapper for the ED command last week to keep an audit trail of 
any changes made to files outside our applications.  I'm just writing a 
before and after version of an edited record to a temp file and 
comparing afterwards.  All seemed fine until one of my coworkers 
informed me he could no longer use "X" to drop back to TCL after editing 
from a select list.  This was due to the fact that I was processing the 
select list in the wrapper program and just executing ED once for each 
record.  For "X" to work as it used to, I need to write out all the 
selected records at the beginning, let ED process the select list, then 
go back through the list again for comparison.

Here's the problem:
No matter what I do, I can't get ED to recognize an active select list 
that is activated within the wrapper program.  I use "READLIST ITEMS" at 
the beginning to get the list of items to write to the temp file, then 
"SELECTN ITEMS TO 0" prior to executing ED.  I also tried writing the 
list to &SAVEDLISTS& and executing "GET.LIST ":TEMP.LIST prior to 
executing ED, but got the same result.  These two test programs 
illustrate the problem:

BP TEST.READLIST
0001: READLIST ITEMS ELSE ITEMS = ''
0002: PRINT 'CONTENTS OF ITEMS=':ITEMS
0003: SELECTN ITEMS TO 0
0004: EXECUTE 'RUN BP TEST.READLIST2'
0005: LOOP
0006:   READNEXT ITEM ELSE EXIT
0007:   PRINT 'READNEXT ITEM=':ITEM
0008: REPEAT
0009: END

BP TEST.READLIST2
0001: READLIST ITEMS ELSE ITEMS = ''
0002: PRINT 'CONTENTS OF ITEMS=':ITEMS
0003: END

Output:
 >SELECT BP SAMPLE 10

10 record(s) selected to SELECT list #0.
 >>RUN BP TEST.READLIST
CONTENTS OF ITEMS=1 2 3 4 5 DD FF MCT1 T2
CONTENTS OF ITEMS=
READNEXT ITEM=1
READNEXT ITEM=2
READNEXT ITEM=3
READNEXT ITEM=4
READNEXT ITEM=5
READNEXT ITEM=DD
READNEXT ITEM=FF
READNEXT ITEM=MC
READNEXT ITEM=T1
READNEXT ITEM=T2

Clearly the select list is activated by SELECTN because the subsequent 
READNEXT works, but the executed program can't see an active select 
list.  Is there any way around this?  I'd hate to have to make a 
modified copy of the UV ED command, but that's the only alternative I 
see at this point.

TIA,
John

-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users
Disclaimer.  This e-mail is private and confidential. If you are not the
intended recipient, please advise us by return e-mail immediately, and
delete the e-mail and any attachments without using or disclosing the
contents in any way. The views expressed in this e-mail are those of the
author, and do not represent those of this company unless this is clearly
indicated. You should scan this e-mail and any attachments for viruses. This
company accepts no liability for any direct or indirect damage or loss
resulting from the use of any attachments to this e-mail.
-- 
u2-users mailing list
[EMAIL PROTECTED]
http://www.oliver.com/mailman/listinfo/u2-users

Reply via email to