The NoteBook of EricKong

            BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
            611 Posts :: 1 Stories :: 190 Comments :: 0 Trackbacks

          #

          On Mainframes, when you want to perform any task, you write a Job, and give it to the Mainframe Computer for processing. This is called submitting a job.

          However, contrary to what you might fancy, your job doesn’t run immediately. Picture this - there are hundreds and thousands of Jobs, that are submitted on a Mainframe, minute-by-minute, every second, by different folks. How would the Mainframe computer decide which job goes first, and then which goes next and so on..

          The MVS Operating System prepares a pretty time-table, a schedule, that goes something like this - JOB 1 runs at 12 o’ clock, JOB 2 runs at 1 o’ clock, JOB 3 runs at 2 o’ clock and so on.. Thus every job is allotted a time-slot(period) in the Mainframe's Calendar/time-table.

          Before you are just about to submit a job on Mainframes, give your JCL a cursory-glance, to ensure it is syntactically-correct. Forgetting to put a comma, or inserting unnecessary extra-whitespaces, can lead to JCL-Errors. Be cautious about the Datasets begin used by the Job. For example, make sure you've already created the Input-Dataset AGY0157.DEMO.INPUT. Click
          here to get the contents of the Input-Dataset AGY0157.DEMO.INPUT, if you would like to execute the below-job. To submit a JOB on Mainframes, you must type SUBMIT command or just SUB, on the command line of the editor.  I have shown below, how you submit a job on Mainframes.

          Image124[1]

          When you press <Enter>, the Job AGY015A gets submitted to the Mainframe computer for processing. This is indicated by a *** message displayed at the bottom of the screen. The *** indicates, that TSO is waiting for me to read the message. As soon as you press <Enter> key again, the message goes away.

          Image125[1] 

          A common practice adopted by most Mainframe Programmers, is to code the NOTIFY parameter on the JOB Statement. Coding this parameter is quite useful, as it gives you an alert, a notification message, saying "The job AGY0157A has completed".


          Image126[1]
          posted @ 2011-12-21 11:26 Eric_jiang 閱讀(196) | 評論 (0)編輯 收藏

          JCL is very simple and easy to master. There are only eight different JCL statement Types. JCL is is actually a piece of cake, because you use only three of these JCL statements most often – JOB, EXEC and DD.

          You’ll use these very often!

          //name JOB parameters ...
          //name EXEC parameters ...
          //name DD parameters ...

          You’ll use these to “gift-wrap” and pack your JCLs into PROCs

          //name PROC parameters ...
          //name PEND parameters ...

          These are [optional] -
          //* comment
          /* delimiter
          // null ending statement

          Now, I shall focus mostly on the 3 important statement types – JOB, EXEC and DD first, so that you can start to write JCL’s and become productive soon. In the later course of this tutorial, I shall also explain to you how to pack JCLs into Procedures using PROC and PEND.

          The next figure shows how I use JOB, EXEC and DD Statements to copy a file using IEBGENER Program. Below you shall find a stripped down, bare-bones version of the same.

          General format:
          //AGY0157A JOB parameters..
          //*    
          //STEP01 EXEC parameters..
          //SYSUT1 DD parameters..
          //SYSUT2 DD parameters..
          //SYSPRINT DD parameters..
          //SYSIN DD parameters..
          //    

          I hope you recognized this pattern – JOB, EXEC followed by one or more DD Statements. The JCL for all you Batch Jobs will start with one JOB Statement. Following this, the EXEC statement tells which program to run. And, then you code several DD(Data Device) statements, for specifying the input and output files being used by the program. The DD Statement, would assign a symbolic name to an actual dataset name.

          Given below is the JCL that executes the IEBGENER Program to copy the contents of the Physical sequential(PS) file AGY0157.INPUT.DATA to AGY0157.OUTPUT.DATA. Click here to download this Job-listing on your box.

          Image98[1] 
          posted @ 2011-12-21 10:45 Eric_jiang 閱讀(181) | 評論 (0)編輯 收藏

          All COBOL programs(whether your own program, or pre-written & ready-made utility) refer to the input and output files that they access, not by the actual(physical) file name, but using a short symbolic name. The short (alias) symbolic name merely refers to the actual file name values. Through JCL, you will be attaching the actual physical file-names to the symbols. 

          The IBM Utility – IEBGENER expects 4 files :
          Symbolic file name    
          Description
          1. SYSUT1              Where IEBGENER expects to read Input Data
          2. SYSUT2              Where IEBGENER expects to write Output Data
          3. SYSIN               Where IEBGENER expects to receive any special and optional instructions
          4. SYSPRINT            Where IEBGENER expects to write a simple report, about the task it’s done for you, whether it got completed successfully or not, and much more.
          posted @ 2011-12-21 10:41 Eric_jiang 閱讀(153) | 評論 (0)編輯 收藏

          If you are a Windows or Linux user, beware! There are differences between ISPF Text-Editor and its counterparts – Notepad, vi, e-macs etc. Unlike other word-processors, ISPF Text-editor doesn’t allow you to type continuous-text, which will auto-flow on to the next-line. If you want to type some more text on the Next-line, you must first insert a new blank-line manually. That's why you’ve got a whole bunch of Line-Commands. Life ain't easy on Mainframes.

          You can use the following Line-Commands in the ISPF Text-Editor :
          I – To insert a Blank new-line underneath(the current-line).
          D – To delete the current-line.
          M – To move/shift the current-line from one position to another(This is also called Cut-Paste)
          C – To create a second-copy of the current-line(This is also called Copy-paste)
          R – To replicate the current-line.

          This short animated-clip demonstrates how to use Insert Line-Command to insert new lines.

          Inserting Lines 
          The next video-snip shows, how lines-of-text can be deleted, and removed using the Delete(D) Line-Command.

          Deleting Lines

          The Move(M) and Copy(C) Commands are the most useful commands from the lot. Accompanied with Move and Copy, you also need to tell, the position or destination, where the Line is to be Moved-to or Copied-to. Use a second-command to tell where to place the line-of-text – Before(B) or After(A) a destination line-no.

          Moving and Copying Lines
          posted @ 2011-12-21 10:30 Eric_jiang 閱讀(171) | 評論 (0)編輯 收藏

          The ISPF Text-Editor is the free IBM Software, used to enter and store data in Mainframe Files. The ISPF Text-Editor is a power-packed word-processor with a plethora of advanced features, that save several key-strokes and time. Although there are other proprietary products such as File-Aid, ISPF Text-Editor is free, light-weight software.

          ISPF Text-Editor supports Primary-Commands and In-line Commands. Primary-Commands are global, and affect the entire data-set such as FIND, CHANGE, SAVE, REPL, UNDO etc. You enter Primary-Commands on the command-line. Take a sneak-peek below, at how I entered the SAVE Primary-Command.

          image

          Line Commands apply to the current-line or Block-of-lines. You position the cursor against a Line as shown in the glimpse below, type a Line-Command like I, R, M, C, D, ( etc. and press <Enter>. Check-out, how I entered  I-Insert Command against the second-line.


          image
          posted @ 2011-12-21 10:23 Eric_jiang 閱讀(146) | 評論 (0)編輯 收藏

               摘要: The Dataset-List Utility ISPF Menu(3.4) searches and lists out all the datasets matching a particular-name or pattern. Enter the dsname you want to search on the DSLIST Panel.   Menu ...  閱讀全文
          posted @ 2011-12-21 10:12 Eric_jiang 閱讀(476) | 評論 (0)編輯 收藏

          The Move/Copy Utility  ISPF Panel(3.3) creates a copy of a dataset, or moves the members of one Partitioned-Dataset(PDS) to another Library.

          To copy a Dataset, enter c option on the Command-Line. Enter the Source or 'From Dataset-name' to copy. Like-wise, enter m option to move datasets.

            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
                                        Move/Copy Utility                               
          Option ===> C                                                                
                                                                                        
          C  Copy data set or member(s)          CP Copy and print                     
          M  Move data set or member(s)          MP Move and print                     
                                                                                        
          Specify "From" Data Set below, then press Enter key                           
                                                                                        
          From ISPF Library:                                                            
             Project . . .               (--- Options C and CP only         ---)        
             Group . . . .         . . .         . . .         . . .                 
             Type  . . . .                                                              
             Member  . . .                  (Blank or pattern for member list,          
                                             "*" for all members)                       
                                                                                        
          From Other Partitioned or Sequential Data Set:                                
             Data Set Name . . . 'AGY0157.MONTHLY.SALES.REPORT'                         
             Volume Serial . . .            (If not cataloged)                          
                                                                                        
          Data Set Password  . .            (If password protected) 

          While copying a Library, use the Wild-Card Symbol(*), to imply, all members have to be copied.
            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
                                        Move/Copy Utility                               
          Option ===> C                                                                
                                                                                        
          C  Copy data set or member(s)          CP Copy and print                     
          M  Move data set or member(s)          MP Move and print                     
                                                                                        
          Specify "From" Data Set below, then press Enter key                           
                                                                                        
          From ISPF Library:                                                            
             Project . . .               (--- Options C and CP only         ---)        
             Group . . . .         . . .         . . .         . . .                 
             Type  . . . .                                                              
             Member  . . .                  (Blank or pattern for member list,          
                                             "*" for all members)                       
                                                                                        
          From Other Partitioned or Sequential Data Set:                                
             Data Set Name . . . 'AGY0157.DEMO.JCLLIB(*)'                         
             Volume Serial . . .            (If not cataloged)                          
                                                                                        
          Data Set Password  . .            (If password protected) 

          To copy selected members of a Library, use Member-Mask, for example to copy all member-names beginning with C, the mask is C*. 
            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
                                        Move/Copy Utility                               
          Option ===> C                                                                
                                                                                        
          C  Copy data set or member(s)          CP Copy and print                     
          M  Move data set or member(s)          MP Move and print                     
                                                                                        
          Specify "From" Data Set below, then press Enter key                           
                                                                                        
          From ISPF Library:                                                            
             Project . . .               (--- Options C and CP only         ---)        
             Group . . . .         . . .         . . .         . . .                 
             Type  . . . .                                                              
             Member  . . .                  (Blank or pattern for member list,          
                                             "*" for all members)                       
                                                                                        
          From Other Partitioned or Sequential Data Set:                                
             Data Set Name . . . 'AGY0157.DEMO.JCLLIB(C*)'                         
             Volume Serial . . .            (If not cataloged)                          
                                                                                        
          Data Set Password  . .            (If password protected) 

          Enter the Target or Destination 'To Data-set' for copying.
            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
          COPY     From AGY0157.DEMO.JCLLIB                                             
          Command ===>                                                                  
                                                                                        
          Specify "To" Data Set Below                                                   
                                                                                        
          To ISPF Library:                 Options:                                     
             Project  . .                     Enter "/" to select option                
             Group  . . .                     /  Replace like-named members             
             Type . . . .                     /  Process member aliases                 
                                                                                        
          To Other Partitioned or Sequential Data Set:                                  
             Data Set Name . . . 'AGY0157.DEMO.JCLLIB.COPY'                             
             Volume Serial . . .           (If not cataloged)                           
                                                                                        
          Data Set Password  . .           (If password protected)                      
                                                                                        
          To Data Set Options:                                                          
             Sequential Disposition        Pack Option         SCLM Setting             
             1  1. Mod                     3  1. Yes           3  1. SCLM               
                2. Old                        2. No               2. Non-SCLM           
                                              3. Default          3. As is
                    

          Entering a Member-Mask, will prompt you to pick the members you would like to copy from a List-of-Members. Enter S to select members.
            Menu  Functions  Utilities  Help                                            
          ------------------------------------------------------------------------------
          COPY        AGY0157.DEMO.JCLLIB   TO AGY0157.DEMO.JCLLIB.CO Row 00001 of 00004
          Command ===>                                                 Scroll ===> CSR 
             Name     Prompt          Size    Created           Changed            ID   
          S COMPILE                     15   2009/12/04   2010/10/14 20:36:22    AGY0157
          . COMPJCL                      5   2010/03/07   2010/03/07 08:03:06    AGY0157
          S COPY                        11   2010/01/24   2010/07/27 03:04:28    CENT01 
          S COPYPS                      13   2010/01/19   2010/06/15 06:06:30    SATEN  
            **End**                                                                     

          The Copy-Utility displays a Panel, when the Target-dsn does not exist. This is new. For many years, when ISPF users wanted to copy a file – PDS or Sequential, the target file had to already exist.
            Menu  Functions  Utilities  Help                                            
          ------------------------------------------------------------------. --
          C |                       Allocate Target Data Set                        |   
          C | Command ===>                                                          |   
            |                                                                       |   
          S | Specified data set AGY0157.DEMO.JCLLIB.COPY                           |   
            | does not exist.                                                       |   
          T | If you wish to allocate this data set, select one of the options      |   
            | below.                                                                |   
            |                                                                       |   
            | Allocation Options:                                                   |   
            |   1. Allocate using the attributes of:                                |   
          T |       AGY0157.DEMO.JCLLIB                                             |   
            |    2. Specify allocation attributes                                   |   
            |                                                                       |   
            | /  Use existing SMS attributes for option 1                           |   
          D |                                                                       |   
            | Instructions:                                                         |   
          T |   Press ENTER to allocate data set.                                   |   
            |   Enter CANCEL or END to cancel allocation.                           |   
            '-----------------------------------------------------------------------'   
                2. Old                        2. No               2. Non-SCLM           
                                              3. Default          3.                                                                                  

           

          posted @ 2011-12-20 18:14 Eric_jiang 閱讀(161) | 評論 (0)編輯 收藏

          To allocate a new Dataset or Delete an Existing Dataset, the Dataset Allocate/Delete ISPF-Panel (3.2) is used. Enter the Dataset-Name in the format XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX separated by period, and prefixed by your TSO User-ID.

            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
                                         Data Set Utility               
          Option ===>
          A_________________________________________________________________
                                                                                        
              A Allocate new data set                   C Catalog data set                
              R Rename entire data set                U Uncatalog data set              
              D Delete entire data set                   S Short data set information      
          blank Data set information                  V VSAM Utilities                  
                                                                                        
          ISPF Library:                                                                 
             Project  . . ________          Enter "/" to select option                   
             Group  . . . ________         /  Confirm Data Set Delete                   
             Type . . . .  ________                                                      
                                                                                        
          Other Partitioned, Sequential or VSAM Data Set:                               
             Data Set Name . . . 'AGY0157.MONTHLY.SALES.REPORT'______________________
             Volume Serial   . . . ________ (If not cataloged, required for option "C")  
                                                                                        
          Data Set Password  . .           (If password protected)                  

          Allocation of new-Datasets requires the user to specify the Space-Requirement, how much space in TRKS or CYL the Dataset should occupy.

            Menu  RefList  Utilities  Help                                              
          ------------------------------------------------------------------------------
                                      Allocate New Data Set                             
          Command ===> _________________________________________________________________
                                                                             More:     +
          Data Set Name  . . . : AGY0157.MONTHLY.SALES.REPORT                           
                                                                                        
          Management class . . . ________       (Blank for default management class)    
          Storage class  . . . .       ________       (Blank for default storage class)       
          Volume serial . . . .        ________       (Blank for system default volume) **    
          Device type . . . . .         ________       (Generic unit or device address) **     
          Data class . . . . . .         ________       (Blank for default data class)          
          Space units . . . . .         TRACK              (BLKS, TRKS, CYLS, KB, MB, BYTES         
                                                                             or RECORDS)                            
          Average record unit     __                     (M, K, or U)                            
          Primary quantity  . .     10                     (In above units)                        
          Secondary quantity      10                    (In above units)                        
          Directory blocks  . .      00                     (Zero for sequential data set) *        
          Record format . . . .      FB                                                    
          Record length . . . .       80                                                    
          Block size  . . . . .          800                                                    
          Data set name type :                             (LIBRARY, HFS, PDS, or blank)  *         
                                                                             (YY/MM/DD, YYYY/MM/DD                   
          Expiration date . . .                                 YY.DDD, YYYY.DDD in Julian form       
           
          posted @ 2011-12-20 17:57 Eric_jiang 閱讀(189) | 評論 (0)編輯 收藏

          In the next few tutorials, I’ll show you how to use JCL to run programs, read file, send output to printer, create and delete files. But, before this you need to key in some data into your computer system. This data consists of 80-byte records.

          After creating a file, you need to an ‘E’ against the file-name to edit the file. Let’s assume that you wanted to key in Employee Data in Physical Sequential file – AGY0157.EMPLOYEE.DATA. Here goes. After you’ve found the file using ISPF Dataset List Utility 3.4, just type E against that dataset, and hit Ctrl.

          Image93[1] 

          Just as on Windows, the default editor in Notepad, typing E against the dataset name, causes the file AGY0157.EMPLOYEE.DATA to open in the editing mode. The editing mode allows you to change the contents of the file – add new data, modify the data, or delete the data. On the other hand, you can also open the file in View Mode (type V) or Browse Mode (type B). View Mode or Browse mode is a read-only mode(You cannot change the contents).

          Generally, when you open Production Files(Files which are being used, when the Mainframe application is running live), it’s always a good practice to open them in read-only mode.

          Initially, the file AGY0157.EMPLOYEE.DATA is empty. When you open it, in Editing mode, it looks like this -

          Image94[1]

          You can now key in your data in the file, and save it by typing the SAVE Command on the command line field.


          Image95[1]
          posted @ 2011-12-20 17:45 Eric_jiang 閱讀(152) | 評論 (0)編輯 收藏

          To refer to a member of a Partitioned Dataset in JCL, you code the dataset name with the member name in parenthesis. Here, is how you code my dataset name in JCL, when I have to refer to a job named PROGRAM1 in my SRCLIB (Source Library).

          AGY0157.DEMO.SRCLIB(PROGRAM1z)
          posted @ 2011-12-20 17:42 Eric_jiang 閱讀(137) | 評論 (0)編輯 收藏

          僅列出標(biāo)題
          共57頁: First 上一頁 35 36 37 38 39 40 41 42 43 下一頁 Last 
          主站蜘蛛池模板: 周宁县| 新营市| 平湖市| 太湖县| 蚌埠市| 哈密市| 肥乡县| 东至县| 红河县| 锡林郭勒盟| 乳源| 政和县| 金昌市| 砚山县| 积石山| 新乡县| 望谟县| 阜平县| 霍州市| 剑河县| 保山市| 信宜市| 饶平县| 高淳县| 读书| 柳江县| 河北省| 上思县| 屏东市| 许昌县| 高平市| 东乡县| 专栏| 绥中县| 南平市| 新邵县| 平远县| 德保县| 绵竹市| 昆明市| 新津县|