Format Text Date
Aug 25
| //___________________________________________________________ // TextDate(): Returns the current date, formatted as text // // For example: ‘Aug 25, 2009′ //¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ p TextDate b d pi 25a d peDate d Options(*NoPass) d DatFmt(*ISO) d CurDate s d DatFmt(*ISO) d retField s 25a d MonthsDS ds /Free If %Parms > 0; CurMonth = Months(CurMM); retField = CurMonth + ‘ ‘ Return retField; /End-Free |
RPG center text Procedure
Aug 24
|
h NoMain
//___________________________
// šCenter text.
// šReturns passed in text centered within size of field
// špassed in.
// Copyright 2009
// iPort Tech www.iPortTech.com
//___________________________
//ˆRevision Log
//žDate žProgrammer žComment
/Copy cpysrc,z_Center
//___________________________
p z_Center b Export
d pi 256a
d peString 256a Const
d Varying
d peLength 5u 0 Const
d Options(*NoPass)
d StartPos s 5i 0 Inz
d wwLen s 5i 0 Inz
d retField s 256a Varying
/Free
If %Parms > 1;
wwLen = peLength;
Else;
wwLen = %Len(peString);
EndIf;
retField = wwLen;
StartPos = ((wwLen – %Len(%Trim(peString))) / 2) + 1;
%SubSt(retField :StartPos) = %Trim(peString);
Return retField;
/End-Free
p e |
API Programming
Jun 2
The number of API’s available on the Power i are increasing with each release of the OS. Why aren’t you taking advantage of these handy tools?
Admittedly some API’s are very complex and cumbersome. We can help you write simple to use wrappers around some of these giving your programming staff easy access to these tools.
Binding Directories
Jun 2
Did you know by placing the correct H spec in your RPG code listing a binding directory you can eliminate the need to manually bind all procedures and service programs when you create your program?
The use of binding directories in combination with /Copy code can help standardize your applications and reduce complex processes to compile code.
Service Programs
Jun 2
When do you use a service program and when do you use a module? There is a difference in performance with each and using the correct method can save processing time for your applications. We use modules when they are called for and service programs when the application justifies it.
As always, if you have questions we’d love to help you answer them.
Subfile Programming
Jun 1
Subfile programming can be tricky but is an essential part of RPG programming.
We have the expertise to develop or enhance subfile applications for you. Don’t hesitate to contact us and take advantage of our knowledge and experience. We listen to what you want.

