DBG/400 logo


Home   Back   Next
bullet point

EDTDBGLNK

No parameters to this one. Run it and you find yourself here. This is the heart of creating data subsets, and is also the most time consuming thing in the package. Having said that, once the job's done, it's done. Have a look at the on-line help - it should make things clear.

We'll start off by creating a link. Hit F6 from the main screen to get the Add Link window. Type in your Target and Control files, and a suitable description of the link

screenshot


Hit F5 to build a skeleton SQL SELECT statement that joins these two files. The cursor is dropped to the end of the statement, then press F7 to view the fields in the Target file.

screenshot


Select the one you want and you're back at the Add Link window.

screenshot


Now that the Target key field (plus prefix) has been inserted, put in an equals sign and press F8. Select the matching key from the Control file, and when back at the window, close the statement with a trialing bracket. If you have more than a single key, just AND them together as usual. Press Enter when finished.

screenshot


And there you have it - a genuine DBG link. Now create more for all the big files on your system ;-)

screenshot

Notes: The control, or source, file is one that will have been set up with data, and shares a common key (or keys) with the target. If the Control was your Customer file, the Source might be your Customer Orders file, with the link being customer code or number. If a script is set up with your Customer file as the reference/primary file, and it contains just a tenth of your customers, then just those Customer Order records that match the control will be copied. The Customer Orders file can then serve as a control for a subsequent link in the script. The reason for creating links for just the big files is that these are the ones that take up disk space and take ages to copy. If the file is only a few meg, then it's probably not worth setting up a link for it. A lot of master files fit into this category (description files for sales regions, etc) - the transaction files are usually the prime candidates for links.


Home   Back   Next