Tuesday, June 16, 2009

Calling all French 2e Users

Just a quick blog today.

CA, actually Daniel Leigh in particular, is looking for Beta testers for the new 8.5 version of 2e. This time for the french language version.

So all my colleagues in 'Les Bleus' country. You can contact daniel. Just let me know you are interested via the comments feature and I will pass on your details or you can contact him directly at:-

daniel.leigh at ca dot com.

Good luck. There are certainly plenty of great new features in this release to get your creative juices flowing.

Thanks for reading.
Lee.

Sunday, June 7, 2009

2e Development Standards - Screen Functions (Part III)

Today we shall take a quick look at the Display File function (DSPFIL).

This is a very commonly used function type in 2e and if my notes are correct there may be a thing or two of interest in this post. However, I guess that this depends on whether you are an ageing old developer like myself or one of the new kids on the block in Bangalore.

But back to the action. Like many other function types the DSPFIL can be used to display data and interact with it in multiple manners. i.e. It can act like an intelligent Select Record and also allow multiple selects. It can also be used to show the contents of an array.

Hold on I hear you say.

"It's a display file and arrays are not files......"

That's true but there are methods to complete this. Nudge me with some comments and I might write up a few examples of code to show you how to achieve this.

Also as the DSPFIL has the CTL (header region) it can be used to provide an interface with a tab look 'n' feel.

Anyhow. Major tip. Take a look at the function options for this function type. In particular, the function option called Re-Process Subfile. Set this on and off and take a look at the action diagram. There will be additional user points and logic added if this is set to Yes. This is just another example of the PODA principle that is taught when you attend training.

PODA stands for Parameters, Options, Design and Action Diagram. The philosphy behind this is simple. The more correct decisions you make at the preceding level i.e. Paramters first, then options (function options) etc the less coding (action diagramming) you will need to do.

2e is quite a neat tool. You should be judging your developers based on the least amount of code required rather than rewarding on a LOC principal (Lines of Code). I think it is fair to say that anyone can write a bad program.

Below are two sections that provide some insight into the function.

General Considerations

The default scan limit is 500. This may not be appropriate for large files. If necessary set the scan limit in USER:Initialise Program to a higher value or even to Maximum. Note: That the scan limit is a model value. If you require a higher number by default (across your model) then I recommend you change the model value YSCNLMT.

Best Practice

Any subfile control selector fields not used should be dropped rather than hidden. This is for performance reasons and avoids the problem of unintentionally deselecting subfile records. To do this simply place enter ‘-‘ against the field from within the EDIT SCREEN FORMAT DETAILS screen.

Multi-part ACP key fields acting as positioners will automatically become selectors if low order fields have data and high order fields are blank. Ensure that you understand the type of data likely to be used for the screen.

Check that the operators used by subfile selectors are appropriate for the function design. Ensure you want EQ, LE, GT or CT for example. Don't assume the default role of these fields.

If a positioner or selector field has mod 10/11 check digit then it may be appropriate to replace with a function field without the check digit. The user does have to enter a valid number to position within a list.

Tip

There is no standard feature to stop the function loading records into the subfile under programmer control. The program continues until subfile page full, scan limit reached or hits end of file. However, you may trick the function to thinking its hit end of file by using a RTVOBJ over the same ACP using a very high key value. This positions the file cursor at end of file.

USER:Process Command Keys has got nothing to do with command keys. Command key processing should normally be added to USER:Process Subfile Control.

Subfile select status field is automatically set to blanks if subfile record processing completes without error.

Gotchas

If F4=Prompt is used on any subfile control selector STS type field then there is no automatic subfile reload and CALC:Subfile Control Function Fields is not executed. User then has to press enter to invoke appropriate selection logic. Function works OK if '?' is used. There is no known workaround for this bug. I would suggest that this is not actually a bug and it is harsh to judge it that way. It is simply because the enter key was pressed for the ? and not the F4 prompt.

CALC:Subfile Record Function Fields is executed before USER:Initialise Subfile Record and therefore you may process a record subsequently deselected. i.e. PGM.*Record Selected.

If any RST input parameter key is also input on device design, and its a file to file relation, then that file validation is deferred until the main validation cycle rather than take place during the load cycle. Any automatic virtuals from the 'Owned by' file will be blank when function is loaded.

An input function field added to RCD format will not automatically check for required value. Even if you set the value to Allow Blank ‘ ‘. This is because the DSPFIL template isn’t designed to have input fields and doesn’t generate the validation routine regardless of how the flag is set or any check conditions. Need to add the code procedurally via the action diagram to force input.

An input function field added to CTL format will not automatically check for required Value. Need to add the check procedurally.

Thanks for reading.
Lee.

Monday, June 1, 2009

Can you feel the momentum that is Ft Lauderdale

Hi all,

I'd like to start this off by writing that I have been on a desert island for the last two months on a meditation course for mid life crisis for balding IT men.

But that wouldn't be true...

or perhaps that I have been on a second honeymoon with my wife and was far too tired to blog :-). But that wouldn't be true........either.

I have however, been very busy at work and the soccer season has started here in NZ so I am playing the beautiful game once more, although i'd preferyou didn't ask how we are doing.

But, even these distractions aren't the reason for my lack of postings in the last 8 weeks.

The true reason is that I have moved my laptop to the study and my 6 year old daughter has discovered the magical world of computing and dominates the machine. I do wonder where she gets it from but I think a new computer is on my shopping list in the next month or two.

How many computers are required in a family home in this day and age? You tube and Britains got talent in particular seem to dominate most of the 15.4' laptop screens in this household.

Anyhow, today is a short post to say that I have a schedule for my weekly posts mapped out and will be adding some highly anticipated 2e tips and tricks over the coming weeks.

Back to this post though.....

The title (of course) is related to the upcoming CA Plex and CA 2E user conference in the USA in September. Take a look at this link www.plex2e.com for more details. I have booked flights, arranged time from work and reserved the hotel room. I have even told the trouble and strife (wife) before I booked this as well. 4 brownie points for me. Shame I am still in arrears on this front.

All I have to do now is to submit my brief for a presentation and............oh yeah!!!!....... get working on it.

This is the highlight of my working year when I get a chance to attend these events, learn great stuff about the products that I use and preach about, socialise with friends and colleagues in the industry both new and old and get to attend a Plex in the city event.

I look forward to meeting many of you over the week that I am there.

Until then take care. Only another 115 days to go. I'm counting them down already.

Thanks for reading.
Lee.