DSTDTA
Distribute Data (DSTDTA)
Back inthe dimmn distant mists of time... I worked for a large Software House and was tasked with writing an tool to enable us to package up programs and other objects and distribute them around any given network. DSTOBJ was born. Over teh years I've rewritten this concept a number of times and its current (very lovely) incarnation uses the PROJEX4I *EGG* processes. CRTEGG, DSPEGG, RSTEGG, WRKEGG - just think of EGGS as the IBMi equivalent of ZIP files containing anything you like and really easy to email around to anyone you like and simple to upload/restore.
But I digress....
Q: I dont want to send THINGS from the system i just want to package up DATA and send it. How can I do that?
A: Use the DSTDTA command you big Ninny!
Distribute Data does exactly that.... it is a hugely flexible command that allows you send all the data in a file or a range of data (based on a very simple SQL selection string). This data can be encapsulated as a flat *TXT file, a *CSV, *XML, *HTML and a few more in the pipeline - namely PDF and XLS.
Distribute Data (DSTDTA)
Type choices, press Enter.
File to be distributed . . . . . File Name
Library . . . . . . . . . . . *LIBL Name, *LIBL, *CURLIB
Member Name . . . . . . . . . . *FIRST Name, *FIRST
How much data is going? . . . . *ALL *ALL, *SQL
F3=Exit F4=Prompt F5=Refresh F10=Additional parameters F12=Cancel
F13=How to use this display F24=More keys
When it creates this subset of data you can choose to have it placed in the IFS ready for manual distribution or (my favorite) have it attached to an email and sent straight to your dekstop. Here's an example of me sending a copy of the user definitions table to my email:

so the email looks like this when it gets to me a few seconds later:







