IBM Power Systems AS/400 iSeries ¤Ë´Ø¤¹¤ë³Ð¤¨½ñ¤­¤Ê¥Ú¡¼¥¸¤Ç¤¹¡£

import java.io.BufferedReader;
import java.io.FileReader;
import java.util.ResourceBundle;

import com.ibm.as400.access.AS400;
import com.ibm.as400.access.CommandCall;

public class ExecCl {
    static String system = null;

    static String user = null;

    static String password = null;

    static AS400 _as400 = null;

    static CommandCall _command = null;

    /**
     * @param args
     */
    public static void main(String[] args) {
        if (args.length != 1) {
            System.err.println("°ú¿ô¤¬Â­¤ê¤Þ¤»¤ó");
            return;
        }
        FileReader fr = null;
        BufferedReader br = null;
        try {
            fr = new FileReader(args[0]);
            br = new BufferedReader(fr);
            String str = "";

            ResourceBundle props = ResourceBundle.getBundle("ExecCl");
            system = props.getString("system");
            user = props.getString("user");
            password = props.getString("password");

            _as400 = new AS400(system,user,password);
            _command = new CommandCall(_as400);
                        
            
            while ((str = br.readLine()) != null) {
                if ( _command.run(str)) System.out.println(str+":Àµ¾ï");
                else System.out.println(str+":°Û¾ï");
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            try {
                br.close();
            } catch (Exception ex2) {
                ex2.printStackTrace();
            }
        }

    }

}

¤³¤Î¥Ú¡¼¥¸¤Ø¤Î¥³¥á¥ó¥È

hFbah0 A round of applause for your blog article.Thanks Again. Keep writing.

0
Posted by seo thing 2013ǯ12·î20Æü(¶â) 19:54:17 ÊÖ¿®

¥³¥á¥ó¥È¤ò¤«¤¯


¡Öhttp://¡×¤ò´Þ¤àÅê¹Æ¤Ï¶Ø»ß¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

ÍøÍѵ¬Ìó¤ò¤´³Îǧ¤Î¤¦¤¨¤´µ­Æþ²¼¤µ¤¤

WikiÆ⸡º÷

Menu

¤³¤³¤Ï¼«Í³¤ËÊÔ½¸¤Ç¤­¤ë¥¨¥ê¥¢¤Ç¤¹¡£

¥á¥ó¥Ð¡¼¤Î¤ßÊÔ½¸¤Ç¤­¤Þ¤¹