All posts in IBM i

El proper dimecres 3 de Juny, tindré el plaer de participar a l’Smart Lunch que organitza el gabinet de comunicació InterMèdia, al restaurant SandwiChez de Plaça Molina, a Barcelona.

Com el nom del format indica, serà a l’hora de dinar, cap a les dues del migdia i s’intentarà que sigui el més Smarty possible ;-)

Així que tot dinant xerrarem sobre la part més humana de les Big Data. En el sentit informàtic del terme, és a dir, com les màquines emulen el raciocini humà per tal d’entendre les dades a les que tenen accès els nostres servidors.

El formant l’he trobat força interessant: Exposició + Fòrum tot dinant. El tema dóna molt de joc, així que de ben segur que ens ho passarem bé!

SmartLunch BigData

Us hi espero!

SmartLunch BigData, la informàtica més humana

Darrerament s’ha publicat un webminar a la secció IBM i de Zend sobre l’adopció de PHP com a llenguatge de propòsit general per a la gestió de negocis i producció.

Es tracta de la implementació d’un ERP escrit en PHP per a Aalberts Industries.

Resulta força interessant l’arquitectura desplegada per integrar l’ERP i el MES amb la producció, tot en PHP amb algunes crides RPG a codi legacy.

L’ERP s’executa sobre l’IBM i i el MES sobre una Debian. El MES requeria accés des de fora de la companyia i interconnexió amb tota la maquinaria de la fàbrica.

Les conclusions resulten força interessants:

• PHP is a universal platform independend programming language
• It’s fast and comprehensive
• Beside WEB programming it can be used for interfaces and processes
• Even real time data analysis is possible
• Zend Server provides the same environment on all platforms
• It’s easy to develop, to trace and to maintain
• It makes fun and provides fast success

Podeu veure aquesta presentació en aquest enllaç

http://static.zend.com/topics/GroupMT-PHP-20120919.pdf

PHP-wich-2Bpublic-2Bcloud-2B2012

A l’enquesta el·laborada per Zend el novembre del 2011 a 3.335 desenvolupadors de PHP, que podeu trobar a aquest enllaç:

http://venturebeat.com/2012/01/11/what-developers-will-be-doing-learning-listening-to-in-2012-survey-results/

Developer Pulse (PDF)

Observem que un 3% dels enquestats respon que durant el 2012 emprarà regularment RPG, el llenguatge de programació per excel·lència del sistema IBM i (AS/400).

 

Coincideix en número amb el percentatge de desenvolupadors que indiquen que el 2012 faran servir la cloud pública d’IBM, la recent IBM Smart Cloud.

 

Era previsible, els desenvolupadors d’IBM i som poquets, però incodicionals d’IBM :)

Captura-php-architect-253A-October-2010-1

Al número d’octubre de la revista php|architect hi ha un interessant article sobre PHP i IBM i (AS/400)

IBM and Zend have pushed hard to prove that PHP on the IBM i is a viable solution, and it is. While they tend to gear most of their marketing toward mainframe developers to switch over to PHP, coming to the IBM i from a PHPers experience is a whole different matter. We know the language, just not this well-aged platform. IBM has done their best to make developers welcome but the environment is still different. I’ll go through some of the common annoyances of having to work on the i, as well as tips to make life easier. This is not an introduction to programming on the i, just tips to make your life easier. –by Chris Tankersley

by Alex Woodie from http://www.itjungle.com/tfh/tfh092611-story02.html
IBM i shops that were hesitant to deploy pre-packaged PHP apps on the platform because of the end of MySQL support from Oracle can go forward with their plans now thanks to the public unveiling of Zend DBi, a new IBM i-specific version of MySQL that Zend Technologies will develop, maintain, and support. Zend DBi is slated to ship with the upcoming December release of the Zend PHP software stack for the IBM i server, the company said last week.
Ever since Oracle announced plans to drop MySQL support for i5/OS V5R4 and IBM i 6.1 last December, IBM and Zend have been working to figure out a way to keep the open source database alive on the platform. MySQL is a critical piece of the PHP puzzle, since the majority of pre-packaged PHP applications (such as SugarCRM, Joomla, and Drupal) were designed to use MySQL. Developers writing new PHP apps aren’t affected as much, as they can hit the DB2/400 database directly.
The solution to the problem became evident last week when Zend officials shared details of the forthcoming Zend Server 5.5 for IBM i release, which is expected to become generally available in December. The new PHP stack will contain Zend DBi, which Zend’s IBM alliance director Michael Scarpato calls a “drop in replacement” for the old release of MySQL for IBM i.
Scarpato on Friday outlined for IT Jungle the current state of MySQL on IBM i support and the plans for making Zend DBi the second officially supported database for the platform. “The status quo at the moment is fine. We ship MySQL as part of Zend Server for 5.1. It’s still available from the Oracle website,” he says.
“The question in the minds of folks in the i community who rely on MySQL is, ‘Who’s going to take care of it as it goes forward?’,” Scarpato asked rhetorically. “So as problems emerge in the code, or as security fixes need to be applied, or if there’s some killer new feature that comes out for other platforms that is very relevant for the i platform as well, how do we get that over? Who’s going to take care of that? It’s an open source project. So anybody could do it. But who’s really going to take responsibility to care and feed it, and then make commercial support available for the community who would like it? So that’s going to be Zend.”
The initial release of Zend DBi will be, for all intents and purposes, functionally identical to the last supported MySQL for IBM i release to come out of Oracle, even if the actual code isn’t quite the same. Zend hasn’t finished porting it over, so it’s impossible to say how much the code bases will look alike. But the plan going forward is for Zend DBi to diverge from the last supported version of MySQL from Oracle, Scarpato says.
Any changes that Zend makes will be posted back to the MySQL open source project, as per the terms of the GNU GPL license that both MySQL and Zend DBi are distributed under. However, there are currently no plans to make Zend DBi an open source project in its own right, Scarpato says. No beta releases of Zend DBi are planned.
Zend is putting in a lot of work to port Oracle’s MySQL source code to IBM i, says Allison Butterill, the Power Systems application development offering manager at IBM. “Oracle provides source code on its website, and anybody can download and create binaries, but it’s nowhere close to a trivial task,” she says. “Zend is taking that on and will use that code for MySQL as the base for what they’re going to provide with Zend DBi.”
IBM will continue to develop the IBMDB2i storage engine, which enables PHP applications that use MySQL to actually store data in DB2/400. A new release of the storage engine that works with Zend DBi will be available with Zend Server 5.5 for IBM i in December.
Besides the new database, Zend Server 5.5 for IBM i will also mark the general availability of the new open source XML Toolkit that Zend and IBM have co-developed. The new toolkit, which we first covered in April, was designed to do a better and more transparent job of connecting PHP applications with existing IBM i programs and services. The old toolkit, which was developed by AURA Equipments, will continue to work with Zend Server 5.5, even though it’s not distributed as part of the new PHP stack, Zend’s senior director of product management Kent Mitchell says.
The new IBM i release of Zend Server 5.5 will bring several other enhancements that have been available for Windows and Linux users for several months. Zend says these include new deployment and IT automation features that will help ease the handoff of PHP applications from development to operations teams, as well as new application delivery functions and automated scaling of enterprise PHP applications.
The new stuff–Zend DBi, the XML Toolkit, and Zend Server 5.5 functions–will be discussed in great detail at the forthcoming ZendCon 2011 conference, which is scheduled for October 17 through 20 in Santa Clara, California. Zend has devoted an entire track to PHP on IBM i topics. PHP on IBM i pros who will be presenting at ZendCon include Mike Pavlak, Alan Seiden, Tony Cairns, and Tim Rowe.
For more information on ZendCon 2011, see www.zendcon.com.

Code
Description
I5_ERR_OK 
0
No error.
I5_ERR_ERROR  
1
Error occurred
I5_ERR_TOOMUCHOPENFILE 
2
Too many open files
I5_ERR_MEMALLOC 
3
Not enough memory
I5_ERR_INVALIDPTR 
4
Invalid pointer (handle); specific message
I5_ERR_FILENOTFOUND 
5
File not found
I5_ERR_FIELDNOTFOUND 
6
Field not found
I5_ERR_INVALIDFIELDNBR 
7
Field number invalid
I5_ERR_INVALIDKEYLEN 
8
Wrong key length
I5_ERR_INVALIDKEYNBR 
9
Wrong key field number
I5_ERR_NOTENABLETOUPDATE 
10
File not allowed to be changed
I5_ERR_INVALIDOPENMODE 
11
File open mode not valid for operation
I5_ERR_RECORDNOTFOUND 
12
Record not found
I5_ERR_RECORDLOCKED 
13
Record locked
I5_ERR_BEOF 
14
End or begin of file reached
I5_ERR_FILELIMITS 
15
Reads out of the file (before or after EOF)
I5_ERR_NOTCONNECTED 
16
Not connected
I5_ERR_INVALIDSEQ 
17
Operation sequence not valid
I5_ERR_NORANGESET 
18
Range not defined
I5_ERR_NOLINKDEFINED 
19
Link not defined
I5_ERR_NOCURRENTRECORD 
20
No current record
I5_ERR_NULLNOTALLOWED 
21
Null operation not applicable (field does not support nulls)
I5_ERR_BADSESSION 
22
AS/400 session not valid
I5_ERR_WRONGLOGIN 
23
Bad login user or password
I5_ERR_NOTENOUGHRIGHTS 
24
User rights problem
I5_ERR_INVALIDTYPE 
25
INVALID TYPE
I5_ERR_INVALIDINFO 
26
Info variable height not enough
I5_ERR_NOTTYPEPROPERTY 
27
Bad property ID
I5_ERR_RECORDCHANGED 
28
The record has changed before update
I5_ERR_ALLREADYINTRAN 
29
Allready in a transaction (nested transaction are not supported)
I5_ERR_NOTINTRAN 
30
Not in a transaction
I5_ERR_INCORRECTVALUE 
36
unable to set the value (out of range; …)
I5_ERR_PARAMNOTFOUND 
37
Requested parameter does not exist in the description.
I5_ERR_ENDOFOCC 
38
Number of occurences greater than the maximum set in the description.
I5_ERR_DESC_UNEXP 
39
Unexpected error while processing description
I5_ERR_DQDESC_UNSUPP 
40
Unsupported description for a data queue
I5_ERR_DESC_WRONG_DATAOP 
41
Wrong operation on a data field of a description
I5_ERR_PARSEXML 
42
Internal error; please contact Aura Equipement; error number 42
I5_ERR_PHP_HDLDFT 
256
No default connection found.
I5_ERR_PHP_HDLCONN 
257
This resource has no connection active.
I5_ERR_PHP_HDLBAD 
258
Bad connection handle
I5_ERR_PHP_OPTIONSTYPE 
259
The type of ” I5_OPTIONS_ALIAS” option must be x and not x
I5_ERR_PHP_OPTIONSNUMBER 
260
Option number -1 is unknown.
I5_ERR_PHP_RESOURCE_BAD 
261
No resource found .
I5_ERR_PHP_TYPEPARAM 
262
Type of element x in parameter -1 must be y. Type z was provided.
I5_ERR_PHP_NBPARAM_BAD 
263
Wrong parameter count
I5_ERR_PHP_TYPEGET 
264
The x function is unable to translate this type (-1).
I5_ERR_PHP_OPERATOR_BAD 
265
Unknown operator (x)
I5_ERR_PHP_BAD_LEN_PROP 
266
The length of the property x is too large; -2 instead of -3 max.
I5_ERR_PHP_LIST_PROP 
267
This element 0¡ is not accepted.
I5_ERR_PHP_SPOOL_FILE_FOPEN 
269
Internal Error on tempory file(x); code error : -1.
I5_ERR_PHP_API_LENGTH 
270
The length of element -1 of parameter is too big (max : -2).
I5_ERR_PHP_BAD_TYPE_KEYNAME 
271
The name property n°-1 must be a string.
I5_ERR_PHP_BOOKMARK 
272
Bookmark value expected for this operator
I5_ERR_PHP_NOT_BOOKMARK 
273
Bookmark value unexpected for this operator
I5_ERR_PHP_CALL_BINDPARAM 
274
The I5_bind_result function can be called only once
I5_ERR_PHP_GETPARAM 
275
specific message
I5_ERR_PHP_BINDPARAM 
276
Internal error; please contact Aura Equipement; error number 276
I5_ERR_PHP_PARAM_DESC 
277
specific message
I5_ERR_PHP_BLOBSIZE 
278
the blob size received(-1) is different of the announced size(-2).
I5_ERR_PHP_SEEK_FIRSTLAST 
279
Bookmark value expected for this operator
I5_ERR_PHP_PROPERTY_NUMBER 
280
This(-1) property number is not valid.
I5_ERR_PHP_VARIABLE 
281
You can’t use the I5_bind_param function and specify parameters
I5_ERR_PHP_BAD_ADDNEW_CST 
282
The only constant accpeted are I5_ADDNEW_NOCLEAR or I5_ADDNEW_CLEAR.
I5_ERR_PHP_NOT_RPIVATE_CONNECTION 
283
The restore connection is not allowed.
I5_ERR_PHP_ALREADY_PGMNAME 
284
You cannot call this function; because it was already called or x was called.
I5_ERR_PHP_PRIVATE_CONNECTION_NOT_FOUND 
285
the -1 connection has not been found.
I5_ERR_PHP_LOCALHOST_NOT_PERMIT 
286
you must specify the AS/400 address
I5_ERR_PHP_INTERNAL 
288
Internal error; please contact Aura Equipement; error number 288
I5_ERR_PHP_EXECUTE 
289
You cannot read a request with parameters without calling the I5_execute function.
I5_ERR_PHP_NO_COMMAND 
290
Empty command line or name
I5_ERR_PHP_EMPTY_ARRAY 
291
Internal error; please contact Aura Equipement; error number 291
I5_ERR_PHP_NO_KEYNAME 
292
Unspecified name for array item -1.
I5_ERR_PHP_NO_PARMNAME 
293
Internal error; please contact Aura Equipement; error number 293
I5_ERR_PHP_NO_ZVALUE 
294
Internal error; please contact Aura Equipement; error number 294
I5_ERR_PHP_COMMAND_ERROR 
295
The command returned an error: x.
I5_ERR_PHP_DATAREA_READ 
296
The command returned an error: x.
I5_ERR_PHP_GET_SYSVAL 
297
The command returned an error: x.
I5_ERR_PHP_UNAVIABLE_PASE 
298
This feature is not available on i5/OS environment.
I5_ERR_PHP_ELEMENT_MISSING 
304
An element of the array has a wrong type within function_name(type) function.
I5_ERR_PHP_BAD_DEF 
305
You cannot define an occurence number; and an occurence reference for the same parameter -1.
I5_ERR_PHP_BAD_KEYNAME 
306
Name x is not a property name for a program description
I5_ERR_PHP_NO_DS_VALUE 
307
You cannot set a value for ‘Data Structure’ x.
I5_ERR_PHP_BAD_DS_INPUT 
308
Values for ‘Data Structure’ parametre -1 does not match the description.
I5_ERR_PHP_DTAQ_BADKEY 
309
The key is not correct.
I5_ERR_PHP_DESC_EMPTY 
310
The description array is empty.
I5_ERR_PHP_BAD_PROG_NAME 
311
Program not found.
I5_ERR_PHP_AS400_MESSAGE 
312
Internal error; please contact Aura Equipement; error number 312
I5_ERR_PHP_NOT_DTAQ_KEY 
313
No key defined.
I5_ERR_PHP_EMPTY_NAME 
314
Object name can not be empty
I5_ERR_PHP_BAD_DTAARA_LENGTH 
315
Data area x should be from -1 to -2
I5_ERR_PHP_EMPTY_PCML 
316
PCML can not be empty
I5_ERR_PGM_DONT_EXIST 
530
Internal error; please contact Aura Equipement; error number 530
I5_ERR_FIELDNULL 
4097
Field value is NULL
IBM_i

Zend is pleased to announce the availability of Zend Server for IBM i 5.1. This release includes significant improvements to performance and stability, as well as the following:

  • PHP 5.2 packages upgraded to 5.2.17
  • PHP 5.3 packages upgraded to 5.3.6
  • Zend Framework packages upgraded to 1.11.3
  • New Zend Server RESTful Web API
  • Native IBM i support for Oracle database drivers
  • New PHP Toolkit (beta)
  • Improvements to Zend Monitor
  • Improvements to Zend Job Queue
  • Security and other bug fixes
Captura-IBM-Systems-Magazine-Power-Systems-Edition-May-2010-5B36-37-5D-Chromium
Encara no hem pogut provar l’Open Access RPG, però seguim de prop les evolucions i controversies.
La revista IBM Systems Magazine Power Systems digital fa una breu pinzellada del que representa Open Access RPG.
Recordo una conversa amb en Xavier Navarro de Recursos AS/400 a finals del segle anterior on arribavem a la conclusió de que el futur de l’AS/400 passava per poder tenir arxius WEBF, com tenim DSPF, que unicament el que havien de fer és preparar la corrent de dades 5250 per a WEB.
Han passat més de 10 anys, i IBM ha decidit fer el pas amb l’Open Access RPG que permet apropar les dades gestionades per l’RPG a tot tipus de dispositiu.
Els programes RPG tradicionalment feien la sortida interactiva dels seus programes cap a dispositius 5250… emulacions avui en dia. I per a fer planes web o desar la informació en arxius plans s’havia de recòrrer a API’s del sistema.
Open Access RPG proporciona la possibilitat d’aplicar una capa de gestió per a aquesta funcionalitat, per exemple mapejar la sortida a pantalla cap a web, la sortida a impressió a un full de càlcul, o l’accés a base de dades amb un servei web.
La paraula clau, mai millor dit, és HANDLER


Fmyfile cf e workstn
handler('MYLIB/MYSRVPGM(hdlMyfile)')
F extdesc('MYFILE')
F

Per a poder crear aquests gestors, hem de tenir la biblioteca QOAR, proporcionada pel producte 5733-OAR, i ens proporciona includes ILE per a RPG i COBOL.

Aquesta possibilitat obre un nou ninxol de mercat per a les empreses que programem utilitats per a departaments d’informàtica AS/400 i obre moltes possibilitats de modernització de les actuals aplicacions 5250 de pantalla verda.

De moment els manuals d’RPG de la versió v7r1 encara no inclouen aquesta instrucció HANDLER, podem esperar una mica més.

prodcutBanner-ZendServer-IBMi

Diu la Zend Newsletter que el PHP s’ha convertit en el llenguatge d’elecció per a la modernització d’aplicacions COBOL i RPG, i Zend Server 5.0 amb suport per a AS/400 – IBM i tindrà un paper clau per garantir implementacions exitoses.

Més informació a http://www.zend.com/products/server/zend-server-ibm-i

És clar que falta per veure l’impacte d’Open Access per a RPG dins l’entorn web, les espectatives són molt altes.

Els codis AID (attention indicator) identifiquen la tecla de funció que s’ha premut en una terminal 5250.

La tecla premuda la trobarem a la posició 369 de la INFDS de l’arxiu de pantalla que volem monitoritzar.

AID Codes
AID key Mnemonic AID Code
Cmd 1 – 12 (cmd 1=x’31′, cmd12=x’3C’) QSN_F1 – QSN_F12 x’31′ – x’3C’
Selector Light Pen Auto Enter QSN_SLP x’3F’
Forward Edge Trigger Auto Enter QSN_FET x’50′
PA1 QSN_PA1 x’6C’
PA2 QSN_PA2 x’6E’
PA3 QSN_PA3 x’6B’
Cmd 13 – 24 (cmd 13=x’B1′, cmd24=x’BC’) QSN_F13 – QSN_F24 x’B1′ – x’BC’
Clear QSN_CLEAR x’BD’
Enter or Record Advance QSN_ENTER x’F1′
Help (not in error state) QSN_HELP x’F3′
Roll Down or Page Up QSN_ROLLDOWN or QSN_PAGEUP x’F4′
Roll Up or Page Down QSN_ROLLUP or QSN_PAGEDOWN x’F5′
Print QSN_PRINT x’F6′
Record Backspace QSN_RECBS x’F8′