[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 10475
  • Last Modified:

Transfer Data from AS/400 to Excel

Hi all

I need some step by step guidance on this one.

I have got to the stage where I see the iseries add on in Excel.

Could someone please give me some instructions how to transfer data now please?

Many thanks!
0
jim25
Asked:
jim25
  • 7
  • 6
  • 2
  • +1
1 Solution
 
mvidasCommented:
Hi James,

I'm guessing you're talking about "cwbtfxla.xll".  I used it a while ago, but found it easier (for me at least) to use other methods of getting data (running a query then using the iSeries Navigator software to move the output to my computer from the AS400 outq).  I still have that add-in, so I'll try to give you some basic instructions on how to use it (though I'm by no means an expert with it).

On the Client Access toolbar that gets added, click the "Transfer Data from iSeries" button.  For the Transfer Request field, choose New, and choose a starting row/cell. Click OK.
Choose the iSeries server you want to get data from, and click Next.
Choose the library/file you want to get data from, click next
The 'Data Options' button is where you define the query/what you want to retrieve. Format Options controls the format of the data, and I almost never changed the run-time options.  Click next when done with that screen
If you want to save this data transfer information (if you need to do it more than once), you can do it on the next screen or just click next from there if you don't need to save it (not the information, just the transfer setup).
Click Finish

Matt
0
 
Dave FordSoftware Developer / Database AdministratorCommented:
I used to use the "Transfer Data to iSeries" button, but I've found it much more flexible to use Excel's built-in capability to import from an ODBC data-source.

- In Excel, click "Data", then "Import External Data", then "New Database Query"
- Select the appropriate previously created ODBC data-source, click "OK"
- Sign on to the '400 on the resulting pop-up
- Select the appropriate table, press the ">" button, and click "Next" 3 times
- Finally, click "Finish", then "OK"

The data will then be returned into Excel with all the appropriate column headings.

HTH,
DaveSlash
0
 
jim25Author Commented:
Thanks guys so much for information.

Sorry to be thick but as Matt will tell you Dave I am new to all this stuff but trying to learn fast!

I have a few questions:

I have reports on my print queue which I would like to transfer to excel.

I have managed to find out that the library for them is QUSRSYS

BUT

I can not see QUSRSYS to select in the procedure Matt outlined.

Dave what do you mean by "previously created ODBC data source"?

Cheers!
0
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

 
Dave FordSoftware Developer / Database AdministratorCommented:
Ahh, I misundertsood slightly. I had assumed you're looking for data in the database. But, it seems you're looking for data in spool files.

If it were me, I'd use iSeries Navigator (a.k.a. Operations Navigator) and drag the spool files to my PC. (click My Connections, your box name, Basic Operations, and Printer Output)

Once it's a text file on your PC, you can very easily import it into Excel.

HTH,
DaveSlash
0
 
mvidasCommented:
James,

I use the iseries navigator as well to do this, it even knows your personal outq based on login name. It is something your help desk should be able to install for you as I believe it is software that comes with the iseries emulator.

The AS400 systems should also have an option of sending it to disk.  If it doesn't work, and you can't get the navigator software, try setting up a shortcut that points to:
\\as400server.domain.com\ROOT\QSYS.LIB\QUSRSYS.LIB

You may need to try removing the \ROOT (and/or possibly the QSYS.LIB), as well as change the location of the server, but I have done that in the past.  If you have any problems with it, you should probably (again) contact your IT dept to see if they have any ideas.

Matt
0
 
theo kouwenhovenCommented:
Hi Jim25,

I think you have a lot of information now, but there is one more option.
Create an HTML file on yout as/400 then you have full controll over the Excel layout
copy it to your PC with extention .XLS and excell will accept it as a normal excelfile.
here some tips.

User the <COLGROUP> to set the column width.
eg.
<TABLE border="0" cellpadding="0" cellspacing="0">
<COLUMNGROUP>
<COL width=70 align="Right">
<COL width=200 align="Left">
<COL width=50 align="Center">
</COLUMNGROUP>
<TR><TD><B>Code</B></TD>
<TD><B>Description</B></TD>
<TD><B>Y/N</B></TD>
<TR><TD>123</TD><TD>example Line 1</TD><TD>Yes</TD>
<TR><TD>Abc</TD><TD>example Line 2</TD><TD>Yes</TD>
<TR><TD>XYZ</TD><TD>example Line 3</TD><TD>Yes</TD>
</TABLE>

One problem is that the grid-lines of excel disapear.
But I did some investigation and found the XML code to get these lines also
(I know there is an HTML equivalent that I don't have but I will find that.)

So by adding this to at the begining of your file, you also get the gridlines

<html xmlns:x="urn:schemas-microsoft-com:office:excel">
<head>
<!--[if gte mso 9]><xml>
 <x:ExcelWorkbook>
  <x:ExcelWorksheets>
   <x:ExcelWorksheet>
    <x:WorksheetOptions>
     <x:Selected/>
    </x:WorksheetOptions>
   </x:ExcelWorksheet>
  </x:ExcelWorksheets>
 </x:ExcelWorkbook>
</xml><![endif]-->
</head>

Please let me know if you need the HTML equivalent for older excel versions then office 2000

regards,
Murph
0
 
jim25Author Commented:
Hi guys thanks for all your info.

How do I now if iseries navigator is installed or not? Is it found in excel or the as400 emulator?

Cheers!
0
 
mvidasCommented:
Neither.. my navigator program is located at  C:\Program Files\IBM\Client Access\cwbunnav.exe, and in the start menu in Programs / IBM iSeries Access for Windows / iSeries Navigator
0
 
jim25Author Commented:
Matt you are a legend among men!

I found the programme! And it is running!

You always seem to explain things so clearly and simply! A sign of a great mentor!!!!

Ok I am going to play around with this iseries navigator and get back to you!
0
 
mvidasCommented:
If you have any control over what the as/400 is exporting, Murph's html suggestion is a great one!  If you can get the report to be generated in that text format, you would only have to click/drag the file from the Navigator then rename as .xls, simple as that.
0
 
jim25Author Commented:
Hi Guys

I am unable to drag the file contents out! Any ideas why?
0
 
theo kouwenhovenCommented:
Probably a security setting in the AS/400
0
 
jim25Author Commented:
How do I find out what it is and how to change it?
0
 
mvidasCommented:
At my company, anyone with Navigator is able to click/drag the files.  Are you trying to drag something that has a .FILE extension? On my as400, the libraries have .LIB extensions, the folders of the library have .FILE extensions, and the files themselves have .MBR extensions.  If I try and drag a .FILE I just get a shortcut to the directory, but dragging the .MBR works well.

On one of our servers, after much testing just now, some folders have a different icon (looks like an outstretched hand from the side, holding the folder at the bottom) if the contents can be dragged.  But on one of my servers the hand icon isn't there at all and I can drag whatever I wish.  You will have to talk to your IT department or the AS400 admin about gaining rights if you've verified you're dragging the first thing and it still isn't working.
0
 
jim25Author Commented:
I did manage to drag some of the files! I must have had a dodgy connection or something!

How do I access other files stored on my as/400 programme?
0
 
mvidasCommented:
Where are your other files located? You should be able to find them in the file system
0
 
jim25Author Commented:
Oh right I shall have a rummage around!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 7
  • 6
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now