MS Office and iSeries. Access Integration. Session 3, More. Functions. ID#
407115. ®. 2. Agenda. ▫ Creating an Excel Spread Sheet with iSeries. Access for
the ...
MS Office and iSeries Access Integration Session 3, More Functions
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
ID# 407115
®
®
Agenda Creating an Excel Spread Sheet with iSeries Access for the Web Publisher – Catalog Merge Runrmtcmd Access -Import and link Files from the AS/400 Importing Files via Import Importing Files via File Transfer Building a portable Database using imported 400 Files Building extension files to use with linked 400 files
Cool Access tools to use with AS/400 Files A definitive method for creating AS/400 files from PC data. Web enabling MS Office
2
1
Creating an Excel Spread Sheet with iSeries Access for the Web
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
New Cool
®
®
Database Tab
4
2
Run SQL
®
5
Start SQL Wizard
®
6
3
®
Select Table
7
®
Pick Columns
8
4
Add Condition
®
9
Pick a field
®
10
5
®
Pick Operator
11
®
Prompt power
12
6
Use List
®
13
®
Define Conditions
14
7
®
More options
15
®
Finish Prompt
16
8
®
Completed condition
17
®
Sort
18
9
®
Run Preview
19
®
Output
20
10
®
Output as HTML
21
®
Output as Excel
22
11
®
Other Options
23
®
Save
24
12
®
Shortcut
25
®
Users request
26
13
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
Catalog with Publisher(2003)
®
®
Start Publisher
Click on blank print publication
28
14
®
Start Merge Click on tools, Mail and Catalog Merge, mail and catalog merge wizard.
29
®
Select Catalog/get data.
Since 2003 is a beta, I downloaded the, file to excel and then linked to excel. Select catalog merge click next, click select a different list and pick your DSN and data, just like other XP mail merge. Check out your data. Click OK, then next on the wizard.
30
15
®
Create catalog layout Click on arrow next to the field to insert. Select if picture or if text. Then size in the catalog area. Repeat for each field. Click next on the wizard.
31
®
View output
If your output is Ok click next to merge, click previous if you need to make any changes.
32
16
®
Complete the merge
Merge to a new document – Presto… Presto…
33
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
Calling a PC Program from the iSeries
®
17
®
Go to the control panel, then administrative tools, then click on services
Set the PC to be able to receive a call
Right click on iSeries access for windows remote command, then click on properties.
35
®
Change remote command properties
On the general tab, use the drop down list to change startup type to automatic. Click the start button. Click OK.
On the log on tab, select allow service to interact with desktop.
36
18
®
Get your IP number
1. Using the Windows "Start" menu, select StartStart>Run... 2. In the "Open" field type cmd (the Windows 2000 command prompt) and click OK. OK. 3. You should see a command prompt window open on your desktop with a flashing cursor after C:\ C:\>. 4. Type ipconfig to get your network configuration information. 5. Locate the line IP Address and write the "dotted decimal" address here: _____ . _____ . _____ . _____ 6. Start an emulation session. 7. Sign on to the iSeries with the user name and password from your worksheet. 8. From the OS/400 Main Menu, type runrmtcmd and hit F4 to prompt the command. 37
®
Running the runrmtcmd 9. In the command field, enter (retaining the single quotes) 'C:\ 'C:\winnt\ winnt\system32\ system32\write.exe'. write.exe'. or ‘C:\ C:\myexcel\ myexcel\cool.xlt’ cool.xlt’ 10. In the remote location field, enter the IP Address you wrote down in step 5. Include the decimal points between the digits. Your IP Address should look something like 10.10.10.50, although the numbers will be different. 11. In the "Type" field, enter *IP to use TCP/IP. 12. In the "Remote user ID" field, enter the PC user name. 13. Hit the Page Down key to see more options. 14. In the "Remote password" field, enter the PC password. The password is case sensitive! 15. Hit the Enter key to run the remote command. The WordPad application 38should have started on your PC.
19
®
Import the Table Open a new Database
Select Import from the New Table menu, then
Choose ODBC Database from the Files of Type dropdown.
39
®
Import Table Use Machine Data Source.
Select your table(s)
40
20
®
Imported Tables
Both the data and the design are in access. The data is available disconnected from the AS/400.
41
®
Building a portable DB using imported 400 Files
Portable Database Use this copy of your 400 based Database for road warriors like Consultants and Market Reps. 42
21
®
Extending an Imported Database
1. Import the File 43
®
Extending an Imported Database
2. Create the picture file 44
22
®
Extending an Imported Database
3. Link the files 45
®
Extending an Imported Database
4. Enter the Data
46
23
®
Extending an Imported Database
6. Create a linked query
47
®
Extending an Imported Database
7. Create a form 48
24
®
Extending an Imported Database
49
®
Extending an Imported Database
8. Create a Web Page 50
25
®
Extending an Imported Database
Right click Properties 51
®
Extending an Imported Database
52
26
®
Linking Files
Works just like Import but the data is never moved from the AS/400.
53
®
Select File(s) to link
Selecting More Than 1 You can select several files at 1 time to link with by press the Ctrl key when clicking on a file.
54
27
®
Linked Tables
In a linked table only the design is copied into access the data remains on the 400. So there is very little you can do without being connected to the AS/400
55
®
Cool Access tools to use with AS/400 Files
Create Reports or Forms from Linked Files Special Access Queries
56
28
®
Once you have your files linked then go to the report tab.
57
®
Select new then choose Report Wizard
Select the fields you want to see on the report 58
29
®
Select grouping and sorting options 59
Choose layout and style options.
®
60
30
®
Save the report 61
®
Now you have a pretty report
62
31
®
You can clean up the report, however it does take a little practice. 63
®
This can help you determine if you have properly “normalized” files 64
32
®
65
®
This query will let you find duplicate records great for mailing files.
66
33
®
67
®
Looking for duplicate names in the file. 68
34
®
It found 2 records with duplicated names
69
®
This query will help you find orphan records
70
35
®
Select the files to work with
71
®
Match up the fields 72
36
®
Add fields to the report 73
®
Now you have a list of orphaned records
74
37
®
Crosstab-Query(step 1) Click on new query Select Crosstab Query Wizard Select the file you want to work with Note you may need to pull data from a query instead of a table since crosstab will not let you select data
75
®
Crosstab-Query
(step 2)
Select your row(s)
76
38
®
Crosstab-Query
(step 3)
Select your Columns
Automatic grouping of dates is a very powerful and useful feature 77
®
Crosstab-Query
(step 4)
Enter the field and function that you want to perform on that field.
78
39
®
Crosstab-Query
(step 5)
79
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
iSeries files from PC data. 1. 2. 3.
File transfer wizard Access iAW
®
40
®
File Transfer Wizard 1. Save as “Excel 5.0/95”
2. Start Transfer TO AS/400
81
®
File Transfer Wizard Transfer Wizard
3. Activate the Transfer wizard and pick the PC file.
82
41
®
File Transfer Wizard
4. Scan builds a FDF from the PC file. 83
®
File Transfer Wizard
5. Scroll to check the fields; Press details to fix 84
42
®
File Transfer Wizard
6. Specify 400 Information click next to transfer data. 85
Access
®
1. Open a text file in Excel
86
43
®
2. Answer the question in the wizard
87
®
88
44
®
3. Cleanup the Columns and check the end of the file
89
®
90
45
®
4. Save as - in Excel format 5. Open a New Database in Access 91
®
6. Get External Data - retrieve Excel File.
92
46
®
7. Go through wizard
93
®
94
47
®
8. Cleanup any errors in Excel an repeat precious step. 9. Assign field types to file using design. (Non-Calculatable Numbers = Text, Decimal Numbers = Dbl, Non-decimal Numbers = Integer) 10. Save As/Export 95
®
96
48
®
Pick ODBC Database 97
®
98
49
®
It’s easier if you built your data source in advance.
99
®
The file is on the AS/400
100
50
®
101
®
The Properties wont be what you want so ... 102
51
®
11. Create a DDS spec and use CHGPF to re-map the fields getting rid of variable length fields.
103
®
iSeries Access for Web
104
52
®
Create Table
105
®
Done already?
106
53
®
Method
Transfer To iSeries Summary PC Notes
AS/400 Notes
Data Transfer from Easiest method on AS/400 use .FDF to PC will work with older versions of CA. Data Transfer File to AS/400.
Must build DDS before transfer so that fields end up in the right place. A RPG program to “parse” parse” decimal fields is required.
File transfer Wizard.
Wizard must be run against a compatible file type(i.e. Excel 95)
No DDS is required, however, a RPG program to “parse” parse” decimal fields is required.
ODBC via Access
More steps and more user intervention, however, it is easier to cleanup bad data.
DDS only required at the end to change file type, no “parse” parse” program required.
iSeries Access for Web
Too easy… easy…
Too Easy… Easy…
107
®
Using Other Databases One of the best features of ODBC is that what works with one DB works with another ODBC compliant DB. You can set up data sources for
SQL Server 7 Oracle FoxPro And more… more…
108
54
Using MS-Office with iSeries Data to create Web Content
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
®
®
Creating an Interactive Web Pivot Table
Save as a web page 110
55
®
Add Interactivity “Select:Sheet” and “Add interactivity” then press “Publish”
111
®
Publish Pivot Table Choose Pivot Table and press Publish
112
56
®
IE
Internet Explorer gives you a linked Pivot Table.
113
®
Data Transfer
114
57
®
Access web wizard (access 97)
115
®
Access web wizard Choose what you want on the web site.
116
58
®
Select the basic format
117
®
Static or dynamic Static or dynamic. Dynamic requires that you setup a MS web server on an NT machine.
118
59
®
Create a home page
Completing the wizard
Save your defaults 119
®
Display your data
120
60
®
Save for Web Access 2000 and XP
121
®
Export ASP
122
61
®
Create a Dynamic Access Page
123
®
Dynamic Access Page
124
62
PowerPoint
®
Save as turns your PowerPoint presentation into a web presentation
125
®
PowerPoint
126
You can use PowerPoint to deliver a presentation over a network.
63
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
Using office to document iSeries DB
®
®
Visio DB Models
128
64
®
Reverse Engineer
129
®
Connect to 400
130
65
®
Build chart CONTACTB PK,FK3 PK
CONTACTC PK,FK3 PK
ACCOUNT# CONTACT_SEQ CONTACT_NAME CONTACT_TITLE CONTACT_PHONE CONTACT_FAX CONTACT_ALT_PHONE1 CONTACT_ALT_PHONE1_TYPE CONTACT_ALT_PHONE2 CONTACT_ALT_PHONE2_TYPE EMAIL_ADDRESS COMMENTS CONTACT_TYPE PRIMARY_CONTACT
FK1 FK2
ACCOUNT# CONTACT_SEQ CONTACT_NAME CONTACT_TITLE CONTACT_PHONE CONTACT_FAX CONTACT_ALT_PHONE1 CONTACT_ALT_PHONE1_TYPE CONTACT_ALT_PHONE2 CONTACT_ALT_PHONE2_TYPE EMAIL_ADDRESS COMMENTS CONTACT_TYPE PRIMARAY_CONTACT
FK1 FK2
CUSTBILL PK
BILLTO# CUSTOMER_NAME SHORT_NAME ADDRESS_1 ADDRESS_2 CITY STATE ZIP BILL_PHONE# BILL_COMMENTS HOME_ACCUM_CODE
CONTACT CUSTCHAN PK
PK
FK1 FK2
CUSTPICK PK
PICKUP_LOCATION_NO
ITEM_TYPE_DESCRIPTION FK3 FK5 CFCONTER
FK1
CONTACT_NAME CONTACT_TITLE CONTACT_PHONE CONTACT_FAX CONTACT_ALT_PHONE1 CONTACT_ALT_PHONE1_TYPE CONTACT_ALT_PHONE2 CONTACT_ALT_PHONE2_TYPE EMAIL_ADDRESS COMMENTS CONTACT_TYPE PRIMARY_CONTACT
PHONE_TYPE_DESC
CFCNTTP ITEM_TYPE
PK
ACCOUNT# CONTACT_SEQ
PHONE_TYPE
CUSTOMER_NAME SHORT_NAME ADDRESS_1 ADDRESS_2 CITY STATE ZIP CHAIN_PHONE# CHAIN_COMMENTS
PK
PK,FK3 PK
CFPHONET
CHAIN#
INVENTORY_ITEM_NUMBER
FK1,FK4
PURCHASE_DATE FISCAL_YEAR_PURCHASED MANUFACTURER ITEM_DESCRIPTION SHORT_DESCRIPTION ITEM_TYPE PO_NUMBER PRICE_EACH QTY_PURCHASED TOTAL_VALUE
FK1 FK6 FK7 FK2
PICKUP_NAME SHORT_NAME SALES_REP# TERRITORY PU_ADDRESS1 PU_ADDRESS2 PU_CITY PU_STATE PU_ZIP PU_COUNTY BILLTO# CHAIN# PU_PHONE# PU_STATUS DIRECTIONS
CFCSTUS PK
PU_STATUS STATUS_DESCRIPTION
CFSALES PK
SALESREP# SALESREP_NAME
CFTRTY PK
TERRITORY TERRITORY_DESC
CFSTATE CUSTITEM PK,FK2 PK
PICKUP_LOCATION_NO ACCT_SEQ
FK1
INVENTORY_ITEM_NUMBER DATE_PLACED SERIAL_NO
PK
STATE_CODE CFCNTY STATE_NAME PK,FK1 PK
STATE_CODE COUNTY_NUMBER COUNTY_CODE COUNTY_NAME
131
®
Table Pos Column TABLE_NAME Total CFCNTTP 1 ITEM_TYPE CFCNTTP 2 ITEM_TYPE_DESCRIPTION CFCNTTP Total CFCNTY 1 STATE_CODE CFCNTY 2 COUNTY_NUMBER CFCNTY 3 COUNTY_CODE CFCNTY 4 COUNTY_NAME CFCNTY Total CFCOMNT 1 COMMENT_CODE CFCOMNT 2 COMMENT CFCOMNT Total CFCONTER 1 INVENTORY_ITEM_NUMBER CFCONTER 2 PURCHASE_DATE CFCONTER 3 FISCAL_YEAR_PURCHASED CFCONTER 4 MANUFACTURER CFCONTER 5 ITEM_DESCRIPTION CFCONTER 6 SHORT_DESCRIPTION CFCONTER 7 ITEM_TYPE CFCONTER 8 PO_NUMBER CFCONTER 9 PRICE_EACH CFCONTER 10 QTY_PURCHASED CFCONTER 11 TOTAL_VALUE CFCONTER Total CFCSTUS 1 PU_STATUS CFCSTUS 2 STATUS_DESCRIPTION CFCSTUS Total CFDRIVER 1 DRIVER_CODE CFDRIVER 2 DRIVER_NAME CFDRIVER 3 DRIVER_STATUS CFDRIVER 4 REPORT_SECTION CFDRIVER 5 DRIVER_INITIALS CFDRIVER 6 DRIVERS_SORT_NAME CFDRIVER 7 LEADMAN CFDRIVER 8 DRIVERS_LIC_NUM CFDRIVER 9 CELL_PHONE_NUMBER CFDRIVER Total CFITEM 1 ITEM_NUMBER CFITEM 2 ITEM_NUMBER_DESCR CFITEM 3 ITEM_UOFM CFITEM Total CFIUOFM 1 UNIT_OF_MEASURE CFIUOFM 2 UOFM_DESCRIPTION
Using Excel with “SYSCOLUMNS” Short
Type
ITEMTP ITEMTD
CHAR CHAR
STATE COUNTY# COUNTYC COUNTYN
CHAR NUMERIC CHAR CHAR
COMCDE COMENT
CHAR CHAR
ITEM# PDATE FYEAR MFG ITEMD ITEMS ITMTYP PONUM PRICE QTY TPRICE
SMALLINT DATE DECIMAL CHAR CHAR CHAR CHAR CHAR DECIMAL SMALLINT DECIMAL
PUSTS PUSTSD
CHAR CHAR
DRVCOD DRVNAM DSTATS RPTSEC DRVINT DRVSORT LEADM DRVLIC DCELL
CHAR CHAR CHAR CHAR CHAR CHAR CHAR CHAR CHAR
ITEMNO ITMDSC IUOFM
DECIMAL CHAR CHAR
UOFM UOFMDS
CHAR CHAR
Ln 0 2 30 32 2 3 3 20 28 2 37 39 2 4 4 20 50 10 2 20 9 2 11 134 2 20 22 3 30 1 2 3 5 1 15 10 70 5 30 2 37 2 30
Num Dec Null Default
Text 0
N N
''
Item Type Code (CF) Item type Description 0
3
N 0N N N
State County_Number County_Code County_Name 0
N N
'' ''
Comment Code1 Comment
0 NULL 0 NULL NULL '' '' NULL
Item Number Date Purchased Fiscal_Year Purchased Manufacturier Item Description Item Description Item Type Code (CF) Purchase Order Number Price Quantity Total Price
0 4 4
9 4 11
0N Y 0N Y Y N N Y 2N 0N 2N
0 0
0 N N
PU Status PU Status Description 0
N N N N N N N Y Y
'N' NULL NULL
Driver Driver's Name Driver Status Report Section Drivers Initials Drivers Sort Leadman Drivers_Lic_Num Drivers_Cell_Phone
'' 'CW'
Item Number Item Number Description Unit of Measure
''
Unit of Measure Unit Of Measure Description
'' 'A' '01'
0 5
0N N N
0 N N
132
66
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
Crystal Reports
®
®
Crystal Start
134
67
®
Connect
135
®
Connect
136
68
®
Pick files
137
®
Link Files
138
69
®
Design Report
139
®
Grouping
140
70
®
Start Adding Fields
141
®
Formula
142
71
®
Add more fields
143
®
Preview
144
72
®
Add Selection Parameter
145
®
Still More Fields
146
73
®
Add Selection
147
®
Preview
148
74
Berbee Frank Thomas 4092 Holland Sylvania Road Suite C Toledo, OH 43623
[email protected] (419) 824824-9626
Thank You Go Do Enjoy
®
75