=============================================== SEARCH400.COM DEVELOPER TIP August 1, 2001 More developer tips at http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html =============================================== SPONSORED BY: ARCAD Software =============================================== How up to date is your AS/400 technical DOCUMENTATION? ARCAD Observer is a unique and powerful AS/400 solution offering a completely automated technical documentation process of your AS/400 applications. This highly configurable and graphical software instantly generates technical documentation directly on your PC. The FREE, fully functional NEW AS/400 Source Code Analyzer for RPG, COBOL & ILE is available to the first 500 ARCAD Site visitors at http://www.arcadsoftware.com/ Contact Eric at (978) 927 2931 in the US and Canada. =============================================== STORAGE DECISIONS 2001 =============================================== Storage Decisions 2001 brings together top storage analysts such as Gartner VP Nick Allen and Steve Duplessie of ESG and expert technologists such as best-selling author Jon William Toigo. This exclusive conference is FREE to members who qualify. Apply today. http://www.StorageDecisions2001.com. ================================ Transfer spreadsheet data with blank cells By Francis Lapeyre, search400 member Transferring data from one program to another on a given system is hard enough. Add another system into the mix, and it can get really tricky. This tip offers a way to handle blank spreadsheet data to AS/400. You might have a tip for iSeries developers. Why not submit it? http://search400.techtarget.com/tipsPrize/0,289492,sid3_prz751399_cts751376,00.html We'll post it on our site and also enter your into our tips contest for nifty prizes. ------------------------------------------------------------------ If you have to import a spreadsheet to your AS/400 that is in .CSV format, you can use CPYFRMIMPF. However, this command will not work if any of the fields in the .CSV file are blank or zero. The record looks something like this: 73,"1","1","","4",0,0,"","W 13","","",0 73,"1","1","","5",0,0,"","W","","",0 73,"1","1","","6",0,0,"","W","","",0 73,"1","1","","7",0,0,"","W","","",0 73,"1","1","","8",0,0,"","W","","",0 73,"1","1","","9",0,0,"","W","","",0 To get around this limitation, define another physical file, using DDS, identical to the one you want to copy to, but add the ALWNULL keyword to all fields which could be blank or zero. I use the FTP client on my PC to transfer the spreadsheet, which is in .CSV format, to a flat file (which you can let FTP create for you). Then I use the CPYFRMIMPF command to copy the flat file to the file I created with the null capable fields. (I use the default delimiters of a double quote for STRDLM, and a comma for FLDDLM.) Then I copy the records from that file to my "regular" file (the one without the null-capable fields) with CPYF FMTOPT(*NOCHK). The data will be in the non-null-capable-field file correctly. The null fields in the .CSV will be blank or zero. Note: The companion command CPYTOIMPF will not produce a file with null fields in it; numeric fields with zero values will have a zero. For example, an amount field would have ".00 ", and blank character fields will have blank spaces filling the length of the field. ------------------------------------- COMMENTS AND FEEDBACK ------------------------------------- Did you like this tip? Let us know. You can rate it at http://search400.techtarget.com/tip/1,289483,sid3_gci756083,00.html. Or you may e-mail us with your comments at mailto:[EMAIL PROTECTED]. You may also post your comments in our live Discussion Forums at http://search400.discussions.techtarget.com ------------------------------------- FEATURED PRODUCT ------------------------------------- JavaScript Fundamentals This course describes the features of JavaScript and compares JavaScript with other technologies, such as Java. The course also covers the fundamentals of JavaScript programming, JavaScript variables, operators, loops, and conditional statements. http://as400.gofcs.com/products/by_product/IP0450/index.html ================================ SIGN UP FOR SEARCH400 DAILY NEWS E-MAIL ================================ "NotesBench helps users avoid capacity confusion" "Disk I/O sightings create real savings" Did you see these headlines yesterday? You would have if you received search400's Daily News e-mail. Not only do we give you the latest IBM and iSeries news, but we also link you to choice articles and Web sites specific to the iSeries in our Daily Best Web Links. Sign up to receive search400's free news e-mail at http://search400.techtarget.com/register/1,,sid3,00.html ======================================================== If you would like to sponsor this or any techtarget newsletter, please contact Gabrielle DeRussy at mailto:[EMAIL PROTECTED]. ======================================================== If you no longer wish to receive this newsletter simply reply to this message with "REMOVE" in the subject line. Or, visit http://search400.techtarget.com/register and adjust your subscriptions accordingly. If you choose to unsubscribe using our automated processing, you must send the "REMOVE" request from the email account to which this newsletter was delivered. Please allow 24 hours for your "REMOVE" request to be processed.
