Sending iSeries 400 Database Files to Users as a DBF File |
Product: | BusinessLink/WEB | |
Modified Date: |
Introduction The BusinessLink Software has the ability to send iSeries 400 database files to AB/Remote and BusinessLink/For Java users, and allow them to open the file in a spreadsheet program that supports DBASE3, such as Microsoft Excel. This is done through first converting the database file from EBCDIC to ASCII, and then sending the converted file to the user using the ABLAPI command. For purposes of example, we will assume that the member "DTAMBR" in file "DTAFIL", library "DTALIB" exists and that we are trying to send it to Java Registration #1 as "DTAFIL.DBF". Converting the file to ASCII First, a temporary destination file must be created. The converted data will be placed in this file. ==> CRTPF FILE(QTEMP/DTAFIL.DBF) RCDLEN(300) SIZE(*NOMAX) Then, the CVTDBFABL command is used to convert the file from EBCDIC to ASCII. ==> ABL/CVTDBFABL FILE(DTALIB/DTAFIL) MBR(DTAMBR) PCFILE(QTEMP/DTAFIL.DBF) + PCMBR(DTAFIL.DBF) PCTYPE(DBASE3) Sending the File Use the ABLAPI command to send the file to the user. ==> ABL/ABLAPI DVC(J) REGN(5) ATTFILE(DTAFIL.DBF) ATTLIB(QTEMP) ATTMBR(DTAFIL.DBF) If one was sending the file to an AB/Remote user, the same process would apply, but one would use a Device Code "R", so: ==> ABL/ABLAPI DVC(R) REGN(5) ATTFILE(DTAFIL.DBF) ATTLIB(QTEMP) ATTMBR(DTAFIL.DBF) Receiving the File Once the file is on the Java User's available files list, they can choose to retrieve it. On PC's where the .dbf extension is already associated with a spreadsheet viewer, these files will open automatically. On PC's where this is the first time a .dbf file has been open, the appropriate application will need to be chosen. ** End of Technical Support Bulletin ** |
![]() |