Add extracted data to an output file.
Combining good ideas and smart techniques adds a certain dimension to my efforts when I’m searching for topics to cover in APIs by Example. In “Thinking Outside the SQL Box, Part 2” (February 2012), John Vriezen describes a clever way to use SQL to extract file data from journal entry images. Although I read his article, I never got around to putting the technique to use. Then, a while later, iPro Developer reader Arthur Adams presented me with an idea to implement a CL command that can extract and recover database journal entry images and add them to an output file.
So in this article, I’ll provide the Extract Journal Data (EXTJRNDTA) command, as well as a couple of CL commands that help EXTJRNDTA perform a database journal extract. For full instructions on how to create the EXTJRNDTA command and its prerequisite objects, see the “How to Compile” sidebar below.