Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
Posted: Tue Feb 11, 2003 8:39 am Post subject: Problems with LMCOPY command
I used the LMCOPY command to copy multiple members of a PDS into a new PDS. I have few problems with that command.
1. If the replace option is not specified and if the new PDS already has a duplicate member then the LMCOPY throws an error screen with an error code ISRLS212. I don't want this screen to be displayed. I tried to outtrap it, I also tried the NOINTERCOM in TSO PROFILE command. but of no use. Can you suggest a way by which I can stop this screen from being displayed.
2. I want to know how many members have been copied from one dataset to another when I specify any Member Pattern like 'A*'. Will any system variables be set after the LMCOPY command which will have the no. of members that have been successfully copied.
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
Posted: Wed Feb 12, 2003 1:19 am Post subject:
Hi Phantom
Regrading your first problem, to suppres ISPF error messages, use the
service "ISPEXEC CONTROL ERRORS RETURN". That will cause ISPF to
return control to your dialog when an error encountered.
After that, you can trap the errors by examining the RC of LMCOPY just
after the service invoked. For you specific problem it will be something
like "IF RC = 12 THEN..."
For your second problem, AFAIK, the LMCOPY sets no system variable.
Still, you can use the following combination:-
A - Generate a stem that contains all members in your library, using
TSO LISTDS MEMBERS with TRAP before.
B - Filter the desired members using the REXX WILDCARD function. This
function can be downloaded from file 520 of the CBT TAPE site.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum