The Musings and Findings of Software Consultant David Klein (Sydney, Australia)
Sunday, 11 January 2009
Just Passed 70-541 - Technical Specialist: Microsoft Windows SharePoint Services 3.0 – Application Development
The exam itself was slightly longer than the MOSS 2007 one (59 questions vs 51 questions) and as is typical for development exams - the difficulty level was a lot higher. You have to know some of your configuration basics PLUS the coding side of things. I came out of the exam after I got my score (900/1000) and was a little miffed that I answered the way I did for some of the questions. Many of the questions try to lead you up the garden path - and I probably was trying to anticipate what the exam creators were thinking a little too much.
I am considering Performance Point (70-556 - Technical Specialist: Microsoft Office PerformancePoint Server 2007, Applications) next as Oakton has some clients who are interested in using it - and skills in the area seem to be in short supply. One problem is that there are no recommended readings for the PeformancePoint exam, so it will largely be a Technet and MSDN study effort. I was in a similar situation for the ASP.NET 2.0 beta exams as well - so I should be OK.
Thursday, 8 January 2009
ABA bank payment file format (Australian Bankers Association) - Field Definitions and Sizes
So where does this fixed width .ABA file format come from? The Australian Bankers' Association is the national organisation of licensed banks in Australia, ranging from traditional retail, trading bank-style organisations to regional banks, foreign and wholesale banks.
These Banks (including the "Big Four", namely National Australia Bank (NAB), The Commonwealth Bank of Australia (CBA), Australia and New Zealand Banking Group (ANZ) and Westpac Banking Corporation (WBC)) reached agreement on a file format for Electronic Funds Transfers (EFT).
I presume for legacy reasons that the chief solutions architects at the banks chose a fixed width file format rather something more advanced like XML with XSD schema definitions (which would allow a simpler process for file format validation and improved readability). I suppose that readability isn't one of the primary goals for these "system generated" files.
Seeing as we are stuck with the format for now, I often have a hard time finding format definition for these files. e.g. the main ABA website doesn't seem to have it documented in any part of their site - http://www.bankers.asn.au/. Instead, for future reference, I've detailed the (.ABA) file format below with a list of the fields and dimensions of these fields:
1. Definitions
Commonly used terms associated with file formatting and their definitions are as follows:
- Left justified - start input in the first character position of that field
- Right justified - end input in the last character position of that field
- Blank filled - fills the unused portion of that field with blank spaces
- Zero filled - fills the unused portion of that field with zeros
- Unsigned - used in amount fields. Amounts will not be specified as debit or credit.
2. Header Record Definition ('0' record) (just the first line):
| Character Position | Field size | Field description | Specification |
|---|---|---|---|
| 1 | 1 | Record Type 0 | Must be '0' |
| 2-18 | 17 | Blank | Must be blank filled. |
| 19-20 | 2 | Reel Sequence Number | Must be numeric commencing at 01. Right justified. Zero filled |
| 21-23 | 3 | Name of User's Financial Institution | Must be approved Financial Institution abbreviation. Westpac's abbreviation is "WBC". |
| 24-30 | 7 | Blank | Must be blank filled. |
| 31-56 | 26 | Name of User supplying file | Must be User Preferred Specification as advised in Application. Left justified, blank filled. All coded character set valid. Must not be all blanks. |
| 57-62 | 6 | Number of User supplying file | Must be User Identification Number which is allocated by APCA. Must be numeric, right justified, zero filled. |
| 63-74 | 12 | Description of entries on file e.g. "PAYROLL" | All coded character set valid. Must not be all blanks. Left justified, blank filled. |
| 75-80 | 6 | Date to be processed (i.e. the date transactions are released to all Financial Institutions) | Must be numeric in the format of DDMMYY. Must be a valid date. Zero filled. |
| 81-120 | 40 | Blank | Must be blank filled. |
3. Detail Record ('1' record)
| Character Position | Field size | Field description | Specification |
|---|---|---|---|
| 1 | 1 | Record Type 1 | Must be '1' |
| 2-8 | 7 | Bank/State/Branch Number | Must be numeric with a hyphen in character position 5. Character positions 2 and 3 must equal valid Financial Institution number. Character position 4 must equal a valid State number (0-9). |
| 9-17 | 9 | Account number to be credited/debited | Numeric, hyphens and blanks only are valid. Must not contain all blanks or zeros. Leading zeros which are part of a valid account number must be shown, e.g. 00-1234. Westpac recommends that (except in the above example), ALL hyphens are edited out. Where account number exceeds nine characters, edit out hyphens. Right justified, blank filled. |
| 18 | 1 | Indicator | "N" -for new or varied Bank(FI)/State/Branch number or name details, otherwise blank filled. Withholding Tax Indicators: "W" -dividend paid to a resident of a country where a double tax agreement is in force. "X" -dividend paid to a resident of any other country. "Y" -interest paid to all non-residents The amount of withholding tax is to appear in character positions 113-120. Note: Where withholding tax has been deducted the appropriate Indicator as shown above is to be used and will override the normal indicator. |
| 19-20 | 2 | Transaction Code | Must only be valid industry standard trancodes (see list). Only numeric valid. |
| 21-30 | 10 | Amount | Only numeric valid. Must be greater than zero. Shown in cents without punctuations. Right justified, zero filled. Unsigned. |
| 31-62 | 32 | Title of Account to be | All coded character set valid. Must not be all blanks. |
| credited/debited | Left justified, blank filled. Desirable format: - surname (period) blank | ||
| - given names with blank between each name | |||
| 63-80 | 18 | Lodgement Reference | All coded character set valid. Reference as submitted by the User indicating details of the origin of the entry e.g. Payroll number, invoice, contract number. |
| Left justified, blank filled. Must not contain all blanks. | |||
| 81-96 (81-87) | 16 | Trace Record (-BSB Number in format XXX-XXX) | Bank(FI)/State/Branch and account number of User to enable retracing of the entry to its source if necessary. Only numeric and hyphens valid. Character positions 81 & 82 must equal a valid Financial Institution number. Character position 83 must equal a valid State number (0-9). Character position 84 must be a hyphen. |
| (88-96) | 9 | (-Account Number) | Right justified, blank filled. |
| 97-112 | 16 | Name of Remitter | Name of originator of the entry. This may vary from Name of the User. All coded character set valid. Must not contain all blanks. Left justified, blank filled. |
| 113- | 8 | Amount of | Numeric only valid. Show in cents without punctuation. |
| 120 | Withholding Tax | Right justified, zero filled. Unsigned. |
4. File Total Record ‘7’ (Trailer)
| Character Position | Field size | Field description | Specification |
|---|---|---|---|
| 1 | 1 | Record Type 7 | Must be '7'. |
| 2-8 | 7 | BSB Format Filler | Must be '999-999'. |
| 9-20 | 12 | Blank | Must be blank filled. |
| 21-30 | 10 | File (User) Net Total Amount | Numeric only valid. Must equal the difference between File Credit & File Debit Total Amounts. Show in cents without punctuation. Right justified, zero filled. Unsigned. |
| 31-40 | 10 | File (User) Credit Total Amount | Numeric only valid. Must equal the accumulated total of credit Detail Record amounts. Show in cents without punctuation. Right justified, zero filled. Unsigned. |
| 41-50 | 10 | File (User) Debit Total Amount | Numeric only valid. Must equal the accumulated total of debit Detail Record amounts. Show in cents without punctuation. Right justified, zero filled. Unsigned. |
| 51-74 | 24 | Blank | Must be blank filled. |
| 75-80 | 6 | File (User) count of Records Type 1 | Numeric only valid. Must equal accumulated number of Record Type 1 items on the file. Right justified, zero filled. |
| 81-120 | 40 | Blank | Must be blank filled. |
5. Direct Entry Transaction Codes
| 13 | Externally initiated debit items |
| 50 | Externally initiated credit items with the exception of those bearing Transaction Codes 51-57 inclusive |
| 51 | Australian Government Security Interest |
| 52 | Family Allowance |
| 53 | Pay |
| 54 | Pension |
| 55 | Allotment |
| 56 | Dividend |
| 57 | Debenture/Note Interest |
Saturday, 3 January 2009
Just passed Microsoft Exam 70-630 Technical Specialist: Microsoft Office SharePoint Server 2007, Configuring with Full Marks
Funny thing was, I almost didn't get to do the exam because the Prometric testing site @ North Ryde (in Sydney) didn't have my name registered (and the name of 3 other guys who arrived at the testing centre). This was because I rescheduled the exam online (at http://www.register.prometric.com/Index.asp) the day Prometric closed over the holiday period. I had to wait around for an hour before the Prometric help desk opened up and did a data synchronisation. Why the process isn't just a scheduled SQL job is beyond me.
Without violating the Non-Disclosure Agreement (these are all in the preparation guide at http://www.microsoft.com/learning/en/us/exams/70-630.mspx), here are some of the things to look for:
- Content types, Content types, Content types
- Security, Audiences and how to enable/disable Personalisation functionality
- Business Data Catalogs
- Know all the stsadm command line parameters inside out - http://technet.microsoft.com/en-us/library/cc263384.aspx
- Know the innards of the logging and diagnostic functionality of MOSS.
My primary sources of information were the 1200 page corker named "The Microsoft Office SharePoint Server 2007 Administrator's Companion", SharePoint 2007 Central Administration online help and, of course, TechNet for SharePoint - see http://technet.microsoft.com/en-au/office/sharepointserver/default.aspx
Thursday, 18 December 2008
"Command line error." when installing Web Part into WSS 3.0/MOSS 2007 with stsadm.exe
http://weblogs.asp.net/soever/archive/2007/12/22/sharepoint-stsadm-exe-and-the-infamous-quot-command-line-error-quot.aspx
and
http://www.celestialsoftware.net/support/forums?ubb=get_topic%3bf=1%3bt=000048
A simple solution is just to make sure you type all your stsadm.exe command parameters in manually and not copy and paste them into your DOS prompt.
Friday, 12 December 2008
Telerik Releases "Open Access", a Database Agnostic ORM Product that Works with LINQ
I'm going to try it out and evaluate it against some of the custom LINQ, LINQ to SQL and Nhibernate-based efforts that I've created and worked with on previous projects. It also supports non-SQL Server databases such as Oracle. Now there is also a fledgling Codeplex project called LINQ to Oracle http://www.codeplex.com/LinqToOracle) but this ORM product could shoot it out of the water. Telerik Open Access also supports direct SQL. I'll do a a review before the end of the year.
Wednesday, 3 December 2008
How can I set the Modified By, Created By, Date Modified, Date Updated fields via the MOSS object model? (without making an new version)

Consequently, the upload of a file to a versioned list in SharePoint requires that you separately add the file with overwrite on and then update the User and Time stamps at a later stage.
Unfortuntately, the "Author" and "Editor" fields accessible via the SPFile Object are read-only. You can however take advantage of the UpdateOverwriteVersion(); available on list items to update these stamps manually. See the code below:
//The authenticating user needs to be service account as it uses database access,
// so we must pass in current user as parameter when adding file.
SPUser updatingUser = EnsureUser(HttpContext.Current.User.Identity.Name, web);
currentFile = fileCollection.Add(newDocument.Name, contents, fileProperties, addAsNewVersionToExistingFiles);
//Get list item from SPFile object
SPListItem listItem = currentFile.Item;
//Overwrite with correct values as the object model doesn't allow us
// to both specify overwrite=true and the specific user names.
listItem["Author"] = updatingUser;
listItem["Editor"] = updatingUser;
listItem.UpdateOverwriteVersion();
How do I handle or abort Function Key events (e.g. F1, F2,etc) in both IE and Firefox?
<script type="text/javascript" language="javascript">
/////////////////////////////////////////////////////////////////////
///Demo Script to display the function key that was pressed
///and abort any browser event e.g. F3 for IE find,
///F1 for IE help, F1 for Firefox Help
/////////////////////////////////////////////////////////////////////
///Version Author Date Comment
///1.0 DDK 03 Dec 2008 Original Version for
/// Application Tender
/// Proof of concept
/// when users wanted 'green
/// screen' functionality
/////////////////////////////////////////////////////////////////////
//debugger;
document.onkeydown = showDownAndAbortEvent;
//Stop F1 opening Help in IE
document.onhelp=function() {return false};
window.onhelp=function() {return false};
// decipher key down codes
function showDownAndAbortEvent(evt)
{
//clearCells();
evt = (evt) ? evt : ((event) ? event : null);
if (evt) {
alert('keyCode:' + evt.keyCode + ';charcode' + evt.charCode + ';' ) ;
try
{
evt.preventDefault(); // disable default help in Firefox
evt.stopPropagation();
}
catch (ex) {}
try
{
//Kill any intercepts for ie
window.event.cancelBubble = true;
window.event.returnValue = false;
window.event.keyCode = 0;
}
catch (ex) {}
return false;
}
}
</script>
Tuesday, 25 November 2008
Aspose.Words Ignores Protection Exclusion for Selected Areas when Generating Word Documents
It is not a viable option to use Form fields and section-based security as it only allows data entry without the ability to change any formatting (this was the workaround suggested by Aspose for now). My client has reluctantly accepted that this is an inherent limitation of the document generation section in our ASP.NET application.
One interesting element in Aspose.Word's implementation is their use of tags to delimit repeating data within table. You pass in a DataSet and it will use the field names (presumably via reflection) to render the fields of your list into a Word table.
See below for an example of the table-binding syntax of Aspose.Word. Note the «TableStart:TableName»«Field1»«Field2»«TableEnd:TableName» syntax.

