Thursday, April 30, 2009

How to open Notepad from As400 Server Command line( StressBuster )

Hey its seems to be exciting but its true .. we can execute any PC Command that we can use in our Dos in AS400 now .

like calc.exe we use to open calculator

notepad.exe to open Notepad and many more

To do so ,

The first step is to

Start iSeries Access Organizer by using command

(STRPCO)

The Start iSeries Access Organizer (STRPCO) command starts the
iSeries Access Organizer on the host system.

Simply fire STRPCO Press F4 the put *yes in Text Assist

The second step is to

Start PC Command by using command

(STRPCCMD)

example

STRPCCMD PCCMD(NOTEPAD.EXE)


and u will see a notepad in front of u ... Is'nt it that surprising..

Just give a try and it will be great fun especially when u get tired after lots of coding .. lolzzzzzzzz

Monday, April 6, 2009

AS400 SQL - Update a field from another file


Updating a field from another file on the AS/400 is done differently than most SQL-based systems. This example uses a JD Edwards table. Here's how to do it:
Syntax:
UPDATE Library/File1 Set Field1= (SELECT Field2 FROM Library/File2 where File1.Id1 = File2.Id2) WHERE File1.Id1 IN (Select Id2 FROM Library/File2)

IMPORTANT!!!: If you leave off the second WHERE statement, you'll wipe out the values of Field1 where the records don't match. Be sure to test this in non-production or you might eliminate LOTS!!! of values in JDE F42119, possibly affecting your performance review if you ever get one.

Example: Update JDE Open Orders Business unit with Address Book Business Unit

UPDATE JDEDTA/F4211 SET SDMCU=(SELECT ABMCU FROM JDEDTA/F0101 WHERE F4211.SDAN8=F0101.ABAN8) WHERE SDAN8 IN (SELECT ABAN8 FROM JDEDTA/F0101)
Note: If you use ODBC in Visual Basic or another program, change the "/" to a dot. Example, UPDATE JDEDTA.F4211... Also, if field names are different, do not use qualifiers in the where clauses.

So the above would look like this in ODBC:

UPDATE JDEDTA.F4211 SET SDMCU=(SELECT ABMCU FROM JDEDTA.F0101 WHERE SDAN8=ABAN8) WHERE SDAN8 IN (SELECT ABAN8 FROM JDEDTA.F0101)

Wednesday, April 1, 2009

System i hits new low: Revenue down 92%


This morning on the radio I heard that IBM had released fourth quarter and 2008 year end results, with the company reporting net income up 12%. But, the System i didn’t fare well in the company’s announced earnings, with a jaw-dropping decrease in revenue of 92% year-on-year. Last quarter, we reported that the System i revenue was down 82%. The explanation is that the company has combined the revenues from Systems i and p in the new converged System p numbers, and no longer attributes any new Power running i sales to the legacy system. On the positive side, revenues from the converged System p server products increased 8%, the only increase for the Systems and Technology hardware segment.

It seems that IBM, a company founded on “machines” has moved on and is now finding success in software, services and financing. In fact, IBM senior vice president and chief financial officer, Mark Loughridge, told a conference call of financial analysts that the company derived 90% of it’s revenue from these segments. But Loughridge shared the company’s optimism going forward, “With the stimulus packages being put in place, the economies will start to improve as we go to the back half of the year. Likewise, for the first quarter our performance will be relatively flat, with growth especially in second half of the year.”