Download from the AS400 tab delimited file

5 pts.
Tags:
AS/400
CL
DB2
I need to be able to download in an automated fashion, a DB2 table as a tab delimited text file on a PC. I have successfully done this manually using the Actions munu in client access but need to be able to do it automatically in either a CL of a PC scheduled job so that it will run unattended. Any ideas will be appreciated.
ASKED: February 12, 2008  4:13 PM
UPDATED: February 13, 2008  4:27 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I don’t know that this will count as an “answer” as much as a knudge in the right direction. A few months back I worked at a company that had an IBM AS/400 … err… iSeries (sorry) and I was able to automate quite a bit in Client Access.

There is a record macro function that records keystrokes and creates a “Macro” that is essentially a wrapper around a VBScript file. With a little VBScript Knowledge you can automate just about anything. (We had a export of data from SQL we automated data entry for once because the “programmers” were to busy to do it.)

A google search of <i><b>ibm client access macro vbscript</b></i> yeilds an interesting site as the first one… <a href=”http://www.mcpressonline.com/scripting/beef-up-client-access-macros-with-vbscript.html”>here</a>

Basically, the file startes out like this:

<i>[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=Midrange Computing Client Access VBScript demo
[PCOMM SCRIPT SOURCE]</i>

After the last line you add your vbscript. Specifically, take a look at the “Using Objects” section of this article it tells you about the objects available that will probably give you what you want to do.

I hope this helps! If not, post more and I’ll see what I can find to help further.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Cwc
    Depending on the specifics of what you're needing to do, you could look into using the CPYTOIMPF command or the CPYTOSTMF command (and their counterparts CPYFRMIMPF and CPYFRMSTMF). They can access files in the native file system or elsewhere in the IFS, and can output to either, and can be nicely automated into a CL program. You can specify the type of delimiters you want to use, or create a fixed format. I've found that they're pretty flexible commands that reduce or eliminate the need for a conversion program.
    4,290 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following