CL
V6R1 CL: The Story Continues
Written by Bruce Vining   
Wednesday, 14 May 2008
You'll find changes to the DCLPRCOPT, INCLUDE, and CMD commands and so much more!

bruce_vining.jpgBy Bruce Vining

Control Language (CL) has seen many significant enhancements in recent releases. With V5R3, CL was enhanced with structured programming constructs such as DOFOR, DOUNTIL, and DOWHILE and the associated commands ITERATE and LEAVE; SELECT and the associated commands WHEN, OTHERWISE, and ENDSELECT; etc. V5R4 followed with additional enhancements, such as subroutines with the command CALLSUBR and the associated SUBR and ENDSUBR controls; data structures with the support of STG(*DEFINED) variables on the DCL; the ability to define compiler options in the CL source using DCLPRCOPT, etc. V6R1 continues this trend with several significant enhancements that impact the development and problem determination associated with CL applications.

Last Updated ( Tuesday, 13 May 2008 )
Read more...
  Discuss...

User Rating: / 1
Enhance i5/OS with IBM's Blessing!
Written by Ted Holt   
Wednesday, 14 May 2008

Others will think you work for IBM.

ted_holt.jpgBy Ted Holt

A System i developer recently informed me that after several years of programming, he is finally learning to create commands. I am amazed that many developers have worked many years with the System i and its predecessors, yet have never created a command, but it seems to be very common.

 

This developer mentioned two areas that have given him trouble, and I was able to help him. First, he wanted to understand how to qualify an object. Second, he wanted to add help text to his command. I have seen this guy's code, and I know that he is very capable. I have no doubt that the commands he produces will be indistinguishable from those IBM ships with i5/OS. Here's the information I gave him. I hope it will be of benefit to many others.

Last Updated ( Tuesday, 13 May 2008 )
Read more...
  Discuss...

User Rating: / 3
The CL Corner: Handling Those Pesky Holidays
Written by Bruce Vining   
Friday, 09 May 2008

Holidays should be fun! With CL-based variables, at least they're not a headache.

bruce_vining.jpgBy Bruce Vining

In the last column in this series, we looked at how to calculate a date such that it would be a minimum of 60 days from an arbitrary date and ensure that the calculated date did not fall on a Saturday or Sunday. We accomplished this using the i5/OS APIs CEEDAYS, CEEDYWK, and CEEDATE. We noticed, however, that holidays were not being handled. When avoiding a Saturday or Sunday calculation, we would use the following Monday, which might be a holiday. In today's column, we'll look at one possible solution for bypassing holidays. Note that there are many, many possible ways to handle holidays. This is simply one: one that may be better or worse than other methods, depending on your situation.

Last Updated ( Thursday, 08 May 2008 )
Read more...
  Discuss...

User Rating: / 2
The CL Corner: More on ILE CEE Date and Time APIs
Written by Bruce Vining   
Friday, 11 April 2008

Everybody loves Saturdays and Sundays, right? Well, no. Sometimes applications don't.

bruce_vining.jpgBy Bruce Vining

In the first column in this series, we looked at the Get Current Local Time (CEELOCT) and Convert Lilian Date to Character Format (CEEDATE) APIs. Today, we will review the Convert Date to Lilian Format (CEEDAYS) and Calculate Day of Week from Lilian Date (CEEDYWK) APIs.

Last Updated ( Friday, 11 April 2008 )
Read more...
  Discuss...

User Rating: / 4
The CL Corner: So You're Looking for a Date?
Written by Bruce Vining   
Friday, 21 March 2008

The CEEDATE and CEELOCT APIs can help!

By Bruce Vining

I'm often asked how to determine a date that is some number of days in the future, or in the past, from another date. Doing this type of calculation yourself can be error-prone in terms of adjusting for the number of days in a month or the number of days in a leap year, getting the right calculation for a leap year, etc. Fortunately, i5/OS provides the ILE Common Execution Environment (CEE) Date and Time APIs to greatly simplify this type of calculation (they're documented in the i5/OS Information Center here). An introduction to the various CEE APIs (there are more than just date and time APIs) can be found here.

Last Updated ( Tuesday, 18 March 2008 )
Read more...
  Discuss...

User Rating: / 4
The CL Corner: Incrementing a Numeric Value Across Jobs
Written by Bruce Vining   
Thursday, 28 February 2008

You probably won't need Compare and Swap (CMPSWP) often, but when you do, you'll appreciate its high level of performance.

By Bruce Vining

There are some types of data, an invoice number for instance, that have characteristics such that the "next" value...

•     needs to be generated concurrently by several jobs,

•     needs to be unique within the application,

•     and is generally sequential in nature.

 

This type of data requirement historically has been satisfied with approaches such as using a data area (*DTAARA) to store and share the next available invoice number across the users of the application. While *DTAARAs work fine for this type of application, other options can provide this level of function at a much higher level of performance. One such option is the Compare and Swap (CMPSWP) Machine Interface (MI) instruction.

Last Updated ( Thursday, 28 February 2008 )
Read more...
  Discuss...

User Rating: / 1
<< Start < Prev 1 2 3 4 5 6 7 8 9 10 Next > End >>

Results 1 - 6 of 134

The following trial software can be found at the MC Press Software Center.   



   MC-STORE.COM