how to clear table in ERW

woows

Active Member
Hi, all.

I would like to write some records into a temp table and by the end of execution clear the table. Any command that I can use in ERW? thanks.

Regards
WWS
 
Several ways to clear the file after processing...

In the last section of the running UBE -
* You could delete (using ER Code) on a key...
* You could use the Call External Command - and clrpfm or use the OS's native way to clear a file from a command line
* Or - the best way (opinion), us a TC. If you delete with a TC you can chose your data selection.

(db)
 
Hi woows,

You can use B8000002 "Delete All Rows From Table" and you have to retrieve and free environment handle calling B8000007 BSFN (before and after B8000002).

I used it with success on XE.

Regards,

Zoltán
 
Hi woows again,

Please, check my post with Post #91354 for detail information, how to call these BSFNs.

Hope this helps,

Regards,

Zoltán
 
Hi woows,

Just other 2 cents:

If your temporary table can be used by more concurrent processes (e.g. more user using the APPL/UBE on different workstations and/or citrix/wts sessions) then they can cause data collision.

The avoid this situation:
- begin all table indices with the same field, which is something NextNumber, BatchNumber, UniqueKeyID type
- before all table operation, retrieve a NextNumber/NextID, which will be unique for your session - let's name it SessionID
- use your SessionID in all temporary table operation
- after the job had been done, you can delete your "session records" whith a single key Delete Table I/O using your SessionID and based on your primary key

Hope, this helps a bit.

Regards,

Zoltán
 
woow,
Have you considered using Cache to create the work file and then deleting the cache when you are done?
Thanks
Bobby
 
using cache? nope. never try that one before. any guide that i can refer? thanks.
 
Hi woows,

Excuse me this late reply, but somehow I missed your post up to now.
[ QUOTE ]
Hi, Zoltan. How can I retrieve your old post?

[/ QUOTE ]
Use the "Search" on the top-bar menu of JDEList screens.
- on the left side, select "All Forums"
- enter "91354" into the Post Number field
- set Date Range large enoudg, or clear both field
- press the Submit on the bottom of the entry screen an voila.

Please, let me know, if you wasn't able to locate it or you have additional question about these BSFN's.

Regards,

Zoltán
 
Hi woows,

Just other 2 cents:

If your temporary table can be used by more concurrent processes (e.g. more user using the APPL/UBE on different workstations and/or citrix/wts sessions) then they can cause data collision.

The avoid this situation:
- begin all table indices with the same field, which is something NextNumber, BatchNumber, UniqueKeyID type
- before all table operation, retrieve a NextNumber/NextID, which will be unique for your session - let's name it SessionID
- use your SessionID in all temporary table operation
- after the job had been done, you can delete your "session records" whith a single key Delete Table I/O using your SessionID and based on your primary key

Hope, this helps a bit.

Regards,

Zoltán

Thanks useful to me. I was designing similar and your insight to consider concurrent processes helped ( 11 years after you posted).
 
Back
Top