The unload procedure must now open the database, and the destination unload file. Assume that the procedure is invoked from OCS with the name of the NDB and the name of the unload file:
$NDBUNLD dbname esdsname
Open the database in exclusive mode, to prevent other users updating it while it is being unloaded:
&DBNAME = &1 -* save db name to unload &UNNAME = &2 -* save esds name &NDBOPEN &DBNAME EXCLUSIVE &IF &NDBRC NE 0 &THEN &GOTO .OPENERROR -* unable to open &FILE OPEN &UNNAME &IF &FILERC NE 8 &THEN &GOTO .OPENERROR -* cant add recs
To preserve any lower-case data, issue &CONTROL NOUCASE:
&CONTROL NOUCASE -* don't fold lower case data
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |