Joined: 26 Apr 2004 Posts: 3258 Location: Charlotte,NC USA
Quote:
The DATAID assignment statement retrieves the data ID for the data set currently being edited and places it in a variable.
The data ID is created by the LMINIT service to identify a data set.
If you begin an edit session with a data ID, the data ID is returned when you issue this command. If you begin an edit session without a data ID, then an LMINIT service obtains a data ID and returns it. On return from a top-level macro, the editor releases any data ID it has obtained.
I don't see where you've used the LMINIT service in your code, so I don't think you chose the right command.