Wednesday, November 11, 2009

List Schedule Jobs

For windows server 2003 or windows Vista, you can use following command to list schedule jobs.

schtasks /query /FO CSV /V >output.csv

For IBM iSeries (AS400), you can use following command to list scheduled jobs.

WRKJOBSCDE OUTPUT(*PRINT) PRTFMT(*FULL)

Monday, October 26, 2009

Convert a IBM AS400 (iSeries) spooled file to PDF



I recently created a program to convert AS400 Spooled file to PDF. Below is the screen shot of the main screen of the program.

After the user login, he can list spooled file by date; if he has '*SPLCTL' authority, he also can list other user's spooled file.


Then he can choice the spooled he want to convert and click 'Convert' button, the PDF will generated in 'PDF Directory' and with the name as below


Spooled file+job name+user+Jobnumber+filenumber.PDF

If you want do the same thing, please let me know, I like to help.










Monday, June 29, 2009

Lenovo T61 Bluetooth

Lenovo t61 running Vista, when start up, show 3 Bluetooth peripheral devices cannot install properly.

The hardware ID is BTHENUM\{00000004-0000-1000-8000-0002ee000002}_LOCALMFG&000f.

After Google, I find following message from

http://forums.lenovo.com/lnv/board/message?board.id=T_Series_Thinkpads&message.id=15948


 

Hi All,

 
 

PROBLEM SOLVED, you might be missing the

D20032-002-001.exe Windows Vista WIDCOMM Bluetooth Driver version: 6.0.1.3400

 
 

 
 

I am using a T61 with a corporate image, and could never get the last Bluetooth peripheral to work in device manager.

After the installation of the "Windows Vista WIDCOMM Bluetooth Driver version: 6.0.1.3400" you will see that it relates to the "Bluetooth Imaging Responder"

 
 

 
 

 
 

Download these drivers here>>

 
 

http://support.gateway.com/support/drivers/getFile.asp?id=21018&dscr=Windows%20Vista%20WIDCOMM%20Bluetooth%20Driver%20version:%206.0.1.3400&uid=226882449

 
 

Hope this helps.

 
 

Cheers

 
 

Monday, May 04, 2009

TOMCAT return 403

Tomcat return 403 for http://127.0.0.1:8080/thgsrp/images/uploaded/watchfront.jpg.

The resource is there, I found the reason in tomcat setting server.xml

<Host appBase="webapps" name="localhost">

<Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>

<Valve className="org.apache.catalina.valves.RemoteAddrValve"

allow="10.1.*.*,192.168.*.*,127.0.0.1"/>

</Host>


 

After add 127.0.0.1 in the allow IP address, the problem solved.

Wednesday, March 25, 2009

GWT Internationalization

I find a good explain about GWT internationalization at http://markmail.org/message/kkve5qmokt6lixub

Below is the notes get from the post:


 

Here are my own notes to set up Internationalization (i18n) in GWT.


 

1. In myApp.gwt.xml


 

<inherits name="com.google.gwt.i18n.I18N"/>

<extend-property name="locale" values="en"/>

<extend-property name="locale" values="sp"/>

<extend-property name="locale" values="fr"/>


 

2. Create 3 properties files in the client folder:


 

MyMessages_en.properties

MyMessages_fr.properties

MyMessages_sp.properties


 

3. Here is the content of MyMessages_en.properties (the other two

files should be identical):


 

enBtn = English

spBtn = Espa&ntilde;ol

frBtn = Fran&ccedil;ais


 

4. Create 3 Button Widgets in the EntryPoint module


 

MyMessages myMessages = (MyMessages) GWT.create(MyMessages.class);


 

Button enBtn = new Button();

enBtn.setHTML(myMessages.enBtn());


 

Button enBtn = new Button();

enBtn.setHTML(myMessages.frBtn());


 

Button enBtn = new Button();

enBtn.setHTML(myMessages.spBtn());


 

5. Create the MyMessages.java in the client folder:


 

package com.myApp.client;


 

import com.google.gwt.i18n.client.Messages;


 

public interface MyMessages extends Messages {

    String spBtn();

    String enBtn();

    String frBtn();

}


 

6. Here is the ClickListener for one of the buttons:


 

enBtn.addClickListener(new ClickListener() {

    public native void onClick(Widget sender) /*-{

     var currLocation = $wnd.location.toString().split("?");

     var currLocale = "?locale=en";

     $wnd.location.href = currLocation[0] + currLocale;

     $wnd.location.replace(currLocation[0] + currLocale);

     }-*/;

});


 

7. Don't forget this meta tag in the main html file:


 

<meta name="gwt:property" content="locale=en">


 

8. Here is how to manually check that the locale are indeed changed:


 


http://localhost:8888/com.myApp.myProject/myProject.html?locale=en

or


http://localhost:8888/com.myApp.myProject/myProject.html?locale=sp

or


http://localhost:8888/com.myApp.myProject/myProject.html?locale=fr


 

Well. That's it. I believe there are enough information in this post

to start the ball rolling for anyone interested to learn how to

internationalize his/her GWT application.


 

Cheerio.


 


 

Thursday, March 19, 2009

Saving and deleting audit journal receivers

This topic describes how to save and delete audit journal receivers, explains why it is important, and provides step-by-step instructions.

Purpose:

To attach a new audit journal receiver; to save and delete the old receiver

How to:

  • CHGJRN QSYS/QAUDJRN
  • JRNRCV(*GEN) SAVOBJ (to save old receiver)
  • DLTJRNRCV (to delete old receiver)

Authority:

*ALL authority to journal receiver; *USE authority to journal

Note: Select a time when the system is not busy to save and delete audit journal receivers.

You should regularly detach the current audit journal receiver and attach a new one for two reasons:

  • Analyzing journal entries is easier if each journal receiver contains the entries for a specific, manageable time period.
  • Large journal receivers can affect system performance, in addition to taking valuable space on auxiliary storage.

Having the system manage receivers automatically is the recommended approach. You can specify this by using the Manage receiver parameter when you create the journal.

If you have set up action auditing and object auditing to log many different events, you may need to specify a large threshold value for the journal receiver. If you are managing receivers manually, you may need to change journal receivers daily. If you log only a few events, you may want to change receivers to correspond with the backup schedule for the library containing the journal receiver.

You use the CHGJRN command to detach a receiver and attach a new receiver.

System-Managed Journal Receivers: If you have the system manage the receivers, use the following procedure to save all detached QAUDJRN receivers and to delete them:

  1. Type WRKJRNA QAUDJRN. The display shows you the currently attached receiver. Do not save or delete this receiver.
  2. Use F15 to work with the receiver directory. This shows all receivers that have been associated with the journal and their status.
  3. Use the SAVOBJ command to save each receiver, except the currently attached receiver, which has not already been saved.
  4. Use the DLTJRNRCV command to delete each receiver after it is saved.

Note: An alternative to the above procedure could be done using the journal message queue and monitoring for the CPF7020 message which indicates that the system change journal has completed successfully.

Thursday, January 29, 2009

Sun Tech Day 2009

I attended the Sun Tech Day on 21 & 22 January in Singapore. It is an event worth to attend.