A Mainframe IDE Powered By Unix Technology [11] - Submit JCL from ftp command or shell script

As we can issue site command in ftp mode,
after that we can submit JCL file to JES and run it,
the JCL file can be located in local folder or z/OS dataset.
 
A. ftp mode:
    1. Submit local JCL file to JES:
        start command console:WIN->run->cmd
        change dir to JCL file's folder:
        >cd dir
        issue ftp command in command console:
        >ftp ip_address
        login with user name and password: user user_name password
        issue site command:
        >site filetype=jes
        You will see:
            SITE command was accepted

        then issue put command to submit JCL to JES:
        >put JCL_File_Name
        then you can use dir to browse:
        >dir
        You will see:
            ftp> dir
            200 Port request OK.
            125 List started OK
            JOB_NAME  JOB_Number  OUTPUT    X Spool Files                            
            250 List completed successfully.

        After job finished, status changed to OUTPUT,
        you can use get command to get spool file to local drive:
        >get Job_Number

    2. Submit JCL file stored in z/OS dataset to JES:
        After issue site command in ftp mode, issue get command like this:
        >get 'dataset_name(member)' spool_file_name
        get command will retrive spool file automaticlly when job finished,
        spool_file_name is the file which will get to local folder.
        You also can issue get command to retrive one of spool file:
        >get JOB_Number.file_number: get J1234567.1
        J1234567 is the job number, it will get the first spool file in job J1234567

    3. Configuration:
        after login and issue site command, issue this:
        >quote site status
        You will see all the settings.
 


B. shell script mode:
    1. We can write a shell to issue all the command we needed at the same time automaticlly.
        Suppose ftpjw is the shell name, we can store ip_address, user name and password in it,
        for security reason, we'd better compile shell scirpt to an executable file, then nobody
        can get something sensitive information like user_name and password etc.
 
        issue this command:
        >ftpjw put JCL_File_Name
        it will submit the JCL_File_Name in current dir to JES.

        issue this command:
        >ftpjw dir
        it will print out the jobs, this based on user's settings, like owner, jobname prefix.

        issue this command:
        >ftpjw get J1234567
        it will get all JOB_Number's spool file into local folder.

        issue this command:
        >ftpjw get J1234567.2
        it will get JOB_Number's 2nd spool file into local folder as the same name for parameter 3 of script.
 
        Due to shell scirpt's reason, we can't submit JCL located in z/OS dataset.
        Script will stop running and won't waiting job finish, we can use expect command to accomplish.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值