You are on page 1of 219

p 

 p  

|
     

{ à 

{
  

{  
  

{  

{   

{   


       !


 

{ p  
   "

{ p  
     "

{  # 
 $    "

{ p  
   $ "

{ %   
  &       "

^
Wha  


      
a a

INPUT A OUTPUT
M

'$( |!|
   $ $ 
   
   
$   
   $ &"
p$  &    
 &(

 $ )* &    +"


         
 $ )*   $"


 
   

     
 $ )* )*"

, - 
       
      
    
 &"
º
aha  

INPUT PURGE
MVS

JES JES

BCP

CONVERSION EXECUTION OUTPUT

 .&  & ) .*


 
   / 0  / 0 
 +"
1
 -   $  )-*  
  $ 
 p  $
)
     
$*"

 
h a   a  a  h !   a "

{  ! " 1
     .   2  $    
"

{    ( 1
   
3  & +   &"

{ ·   " -


 
  
$  
    &"

{  ! "     . à  2  


      $"

{  "    
 . à  2  
     $  
 &"


  a  

Input
Queue Initiator 1
Initiator 2

% % Initiator 3


ÿa#& %)
ÿa#$%& ÿa
%) #$%'(&
ÿa#& ÿa*&

%,
ÿa%&

EXECUTION
%+
ÿa(&

{ ,       ,    



- 
     $ +"
{ , &
      "
{ ,              +"

X
{ . 
     
         3   


  & ). 

   *"

{ ,  
   
 +  
    " à& 
   
 3  & 
  $  "

 '$ |!^  +  4

{    |    $     |     &  



   


  
  4

{   ^ 
       4 4  
$
 ^  4   
 3     /-0"     
 º"

´
  a  ÿ  &

Input
Queue Initiator 1
Initiator 2
% %, Initiator 3
%+
a#$%&
ÿa
%) #$%'(&
ÿa*&

%,
ÿa%&

EXECUTION
%+
ÿa(&



     |    
+

{  |      4


{  ^  
 +   
   24 4  $   
 |4
{  &4  º $     4
{  ^     $   
  /50"

Ë
     

JOB

Step

Data Definitions

Step

Data Definitions

Step

Data Definitions

|6
{ ,        "

{ . 
 $ 
 +  $ "

{ . 

     %  %"
1
  
        
  "

{ , 
      + 7 &"

{  + 8"           "

{  + 8"  %%        ^X^"

||
     
ÿ  &

//JOBNAME JOBParameter,Parameter,«
//STEPNAME EXECParameter,Parameter,«
//DDNAME1 DDParameter,Parameter,«
//DDNAME2 DDParameter,Parameter,«
//* This line is a comment
//STEPNAME EXECParameter,Parameter,«
The //DDNAME3 DDParameter,Parameter,« The
Job Steps
//*This line is a comment
//STEPNAME EXECParameter,Parameter,«
//DDNAME4 DDParameter,Parameter,«
// Parameter,Parameter One more comment
//DDNAME5 DDParameter,Parameter,«
//DDNAME6 DDParameter,Parameter,«
//*Yet another comment line

'$( |!

,  $ & 3    & "

1
  
  &    )  & *  ( à-4 .9.  %%"

, à-   $ 
 $$       
   

    
    "

, .9.   $ 


 $$   ).+  $ * 4
  &4 
    
  " |
, %%   $  .9.  
     
  " 1
& & 

         
  "

1
  &   
       " 1
  4 

  
   
 "

. 
       "       4 
    &"

|^
     
ÿ  )&
,         ´6! & "

,       $   º!|"

. 
       (

 · -· - ÿ $ $  &

       & " 1


& (
{ " ::   |  4      +  
  
"
{ " :;   |    " 1
 $ 
   ! 
  "   !$  
   &   "
{  "::;   |44  ^     


) #· -

    
        " 1
     
   

  4 
    
  4 4(
{  $   ^"
{ |!´ 
   $
) 
     )<4 =4 >**
{ ' 
    
    "
{    &      3"

· am!"

//ABC JOB µMY ACCOUNT¶,¶PROGRAMMER NAME¶,CLASS=A

1
 +    
 
 $$   /,-04    
     
 
 "


, ·# -

  
 &        )"$" à-4 .9.4 %%4 "*(
" ' 
 8,. '
"      &    
 3"

· 

//ABC JOB µMY ACCOUNT¶,¶PROGRAMMER NAME¶,CLASS=A


//STEP01 EXEC PGM=USERPGM

1
  +     
 / à-0   4 

 
     à-
 "

1
  +     
 /.9.0   4 

 
    
)  1.6|*"

|
+ ##·· -

       &  (


" ' 
 à.?,1à8 "
"            3
"    & (
"  
" @&

· 

//ABC JOB µMY ACCOUNT¶,¶PROGRAMMER NAME¶,CLASS=A

1
  à-     
  " 8 
 
&   
   &
 4 
    "

|X
  ·  -"
     &          
 " 1

 '(
" ' 
 ,?,.1.? 
"    &      3"     "
· 


  ·  ·  
· ··  · ·· ·  ·    ·
,&
$  
 $
    
  
      
   " 8

 
     $ AB,A.84  &
$   
     
"


  ·  ·  
· ··  ·
!  " · ·· ·  ·    ·
1
         
      4   
 
"


. a
? 

        

//JOBNAME1 JOB Parameter,Parameter,


Comments
// Parameter,Parameter

 
   
     

  
 
 
    
 

'$( |!X

'$ |!X 
  +   
 à-   $
  "


m! a !    "
,      
  ! 
 )::*  $   |"
 
    
   )  *" %    &  3  
  
  

  $  
  "
       3   
 à   ) 
  4 / à-0*"
    3    "
1
    $          "
         & $   º  |"
   
     &  ) 4 *"
   ! 
  &  3 )::;*    $   |4

       "

a  "   3        


   4  
  
 
  $ 
  3      "

6
a am  
1
   &    (      @&  "
&  a!a am  
 4       "
)& /.  !a am  
     & "

· am!"
//JOBNAME JOB A,B,X=1,Y=2,Z=3

!
  +  4  ,  -       4 94C  5  
@&  "

! 4 
    &    4

|
//JOBNAME JOB A,B,Z=3,Y=2,X=1

- 8à1 4

//JOBNAME JOB B,A,X=1,Y=2,Z=3

 &       &    


      ),* 
4 &
  &

  & $     )-*4 ""

//JOBNAME JOB ,B,Y=2,X=1,Z=3

à  
 3&     &   &  7 ! )B*   "  

4 
&      
          "

   
  &        
 + $"


a am  ÿ  &

Position
ordrtrs

. 
$
A  3&   )   $   *4    4    
 &  .9."

· am!"
//STEPNAME EXEC PGM=Program1

^
/. !a am   ha a! !  a0!a am  
1
   !   
  &    "
· am!"
//DDNAME DD DISP=(A,B,C)
,88à1   
//DDNAME DD DISP=(B,C,A)

/. !a am   ha a! 1. !a am  

1
    !   
    "
· am!"
//DDNAME DD DCB=(A=1,B=2)
,8   
//DDNAME DD DCB=(B=2,A=1)


hma  !  a   a 0 
START


    4 .    
Is Syntax OK NO +4    &     
For Entire
Job? %,%  à:^Ë6   &    "
YES
       4 .
 
   à:^Ë6 +" ,
NO If More à:^Ë6 + 
 à- 
  & +
Steps? 
3"
YES
  & +   4 
 &
Process
Print Output
&  
   4 & 
  
the Step
     +"

YES
Step Ended à
 
   +  &  4
Normally?
 & $ 
   
+   
 "
NO

Print Error
Message

STOP  
'$( |!´
p  ·  
m!  h  "
             !
  " #  $ %a  &
' (

    
 )
 
* +
 
) ,


- .


 / 0+
1   !"  ! 
 !
222222222222222222222
3 '  '!!  +     "    ! !
 
   ! 
222222222222222222222


 ( !   "  
  ( 4   " 
     
    
5 /          " 
 /          
 /        ! !     
            !   "6  $ ÿa  

' /  (! !


 /  +
 1 !
 /  ?  !
* /  ,   !
) /  .   !
'" /    !

X
p )

h % a m


h % a m 

à 
   
 à-  
& +
  

D ,$    $   


D ,
D A,
D 8à1'C
D A..
D ?.Aà8
D 1.
D ?.1,?1
D 1C?p8


 

{ p  
 
 à-    


{   
        
 à-  

{   à-    $  


   
 

^6
 !  h % a m

1
 à-      
 $  

{ 1 & 
   
  
   
  "

{  & 

  
    $ "

{  &
 
   
 
"

{ 1  3  &  $    


 +  
  "

1
 à-   
  &  
      "

C     


    
    4 
$
    & "

^|
. a

1
 à-     
   3&  "

· am!"

//ABC JOB µMY ACCOUNT¶,¶PROGRAMMER NAME¶,CLASS=A

{ C    
        
   &  "

{
      
 p4   $ 7 .  " 1
4 
    

          
 p4 
&   3
 & & 
 .  "

^
a am  2 #    ma  a   amm  am

a am  .!"    


,$    $ /    
 
 "
,$       & $   "
#    ma  " 
       
  " 1
   & 
 $  "
,         $$  |  |º^ 
 "
,        
 $   "
  amm  am" 
     
      
  "

, 
  $  $$  |  6 
 "
,        
 $  8  "
,    
   & $      
  "
· 
 

 #$   " %%&
 

"·  %&
 " 

 '%%&& ^^
a am  2 
#

.!" @&  


 !" 1 $    
  "
. a "
 
 · 
"( ·  ·   &&
,B 
)| 
 "     " /,0 
 /50  /60 
 /Ë0*
· am!"
//ABC JOB ACCT123,¶PROGRAMMER NAME¶,CLASS=A,««.
 ,-  +    /,0"
{ , 
   p |4 
      
   &
)     *
{ ,        
   &$ 
  
$ & 

  )   *4 
 ,     + 
 &   & 
   &" ' +  4 
  $
   

     
"

a am  2 3
#

.!" @&  


 !" 1  &
 
  0     
"
. a "
//JOBNAME JOB ACCTINFO,¶PROGRAMMER ,
NAME¶,CLASS=A,MSGCLASS=A..
A,B $! 
)| 
 "    % " /,0 
 /50  /60 
 /Ë0*

· am!"
//ABC JOB ACCT123,¶PROGRAMMER NAME¶,MSGCLASS=A
{ p$ 
 A,  4 &    
 &
 
 
    &
 "
{ 1
     
 &    &  
       &   "

    4 A,B5  &   


 
  
    &  
"  
   4   &   
 
  
  
  
 à  2 

   "
a am  2 -4

.!" @&  

 !" 1  & 

      
  
 +"

. a "
//JOBNAME JOB ACCT123,¶PROGRAMMER NAME¶,NOTIFY=IBMUSER
8à1'CBp!
),&   p %   & & &*

^
· am!"
//ABC JOB ACCT123,¶PROGRAMMER NAME¶,NOTIFY=IBMUSER

1
 +    & 
   ,866 
 
   

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,NOTIFY=&SYSUID


1
   /FCp%0   
 
  4 

  
  4 
  

 
   "

1
 8à1'C       
      
 
 4 $ 
  + ! )  *  ,  "

à 
  
4  
     8à1'C
 $$ 4
  
  $ 

 $ 
  
  .81.?  & 
 ,  @&"   $$
4 
   $ 
  $)* $ 

 $   $ 
 + $
"

^X
a am  2 3
··

.!" @&    $     "


 !" 1  &
 
 
   $   
  & 
 &"
. a "
//ABC JOB ACCT123,¶PROGRAMMER,
NAME¶,MSGLEVEL=(a,b)
A..B) 4 *
a(  
 
 
 
     
   ) $*"
     64 |  
6 G  & 
    ) à-    
  *
| G     .   $     4  &
 G  &     .  "      
"

(   

 $     
   ) $*"
     6  |
6 G  
   $ &  
   )    *"

| G   
  $ $   
   
 
 
   
· am!"

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,MSGLEVEL=(1,1)

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,MSGLEVEL=(,1)

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,MSGLEVEL=(2,)


a am  2 ·3
.!" @&  
 !" 1  
  +   & 
 
    #"
. a "
//JOBNAME JOB ACCTINFO,¶PROGRAMMER NAME¶,REGION=nnnnM

?.Aà8B@  ?.Aà8B
(8  
   $(
6 
 6ºX666     @
6 
 6ºX     
@( @ & ( $ &
· am!"
//ABC JOB ACCT123,¶PROGRAMMER NAME¶,REGION=1024K
//ABC JOB ACCT123,¶PROGRAMMER NAME¶,REGION=1M
{ ?.Aà8    + &      
      "
{  ?.Aà8B6@  ?.Aà8B6  4 
 &    $ #" º6
a am  2 ·
.!" @&  
 !" 1
 1.         & 
  + $
 p  

       
 "
. a "
//JOBNAME JOB ACCTINFO,¶PROGRAMMER NAME¶,TIME(m,ss)
1. B )4 *
à8 à- 1,1..81 !   
  + $   
 à-"
à8 .9. 1,1..81 !   
  + $   
 1."
!aa
,&           " 4 
  

   
   

     $(
· 
   
        "
·++5 1.B|ºº6  7   $ 1.B8à14  $ 
 

    " 1
 |ºº6  
 &      1. 

       &"
1.B,9p   
          ^ XË| " )1
 
 ´"  
   *
{    
 à-    &    
      +4 
  
 &  "   4 
 .       " º|
· am!0 ·a am 

 
 · 
"·)'*
TERMINATE JOB IF TOTAL
TIME FOR ALL STEPS
EXCEEDS 1 MINUTE AND 30
SECONDS

 ··  


 "·

TERMINATE THIS STEP IF


TIME EXCEEDS 20 SECONDS
# ·· 
+· "·)#*

DO NOT TIME THIS STEP

' ··  · "·"" º


{ 1
        +  |   ^6 " 1
   
    +  | "

{ 8 
 
    & 3$ 
 
      " 4 $
1.B8à1  
     8à1  

  " 1
 1.B)|4^6*  

à-     
  +    ^  |   ^6 "

{  
   &  )  * + 
      
 1.  
 
  )  *4 
  ,-.8%"

º^
a am  2 ·#
.!" @&  
 !" 1
 ?.1,?1    &  $ 
 +  
  
 
 
 
  "
. a "
 
 · 
"( · 
 ·· ,-

· am!"


#' ·  ·· ·#
6  &    3     
      
    $ +4
 
 ?.1,?1  "
6 ' +  4  &
   
  4 
     
  
" C  3 
 
$  
     $
 &   $   
 " 84 &  7 $ & 
   " 1
4 & 
$ 

à-     
 ?.1,?1      +  
  
 "

ºº
a am  2 4p
.!" @&  
 !" 1
 1C?p8    
 &   +  
  "
. a "
 
 · 
"( ·  ·,./0-%
4p # 1C?p8B,8 à& 
3 
   & + " % 
+ 
  "1
    &   $   & " 1
  4
$   $4  &4  &   
 à  2"

4p a
 1C?p8Bà% 
3 
   & +  4    
4
   
   2" 1
   + 
  ) &    * 

 $    

"

4p 4 1C?p8BàC 


àC4  & + 
3$  +  3
 "
1
    
   & $   
 à  2" 1
    
    
 &      
 A,   ) .  à8C*"
· am!"  
 
##$1 +   %
 
# 
## +   2%
 
' 
3'1 +   % º 
· am!  % a m 
'$      à-  
Sample1
//USERJOB JOB ACCT54,¶JOE SMITH¶,TYPRUN=SCAN,
// MSGCLASS=X,CLASS=A,
// MSGLEVEL=(1,1)
Sample2
//MAINJOB1 JOB ,,RESTART=STEP3,
// REGION=4M

Sample3
//TECJOB41 JOB ,¶SMITH¶,
// TIME=1440,
// MSGLEVEL=(2,0)
{   $             "    
  
    4  &       
   $ 
   ) &
$  /;0   ^*"
º
UNIT 3

h·(· a m 

ºX
h·(· a m

{ à "
{    
 .9.  "
{ & +"
{   "

! A
! ?à
! ?.Aà8
! 1.
! ,?

º´
 

{ p  
   
 .9.  "

{   
        
 .9.  "

{ "   .9.    $  


 7"

ºË
 !  h·(· a m

1
 .9.      
 $  

1  & 

$     +"

1  & 

 )    *    +"

1  & 
 & 7     
 "
1
         + $ " 1
4 &  
    
 ).9.  *"


   3$  
 .9.  4   .+  & 7& 

$ &"

,   7 & $    $ 



  "     &  
   
 
       : 
   $  
 à-
 "  6
. a
1
 .9.  
       
 3&  "
· am!"

:: à88,. à- 8à1'CB/0
::1.8,. .9. AB$ ! 

:: à88,. à- 8à1'CB/0
::1.8,. .9. ?àB! 

:: à-8,. à- 8à1'CB/p0
::1.8,. .9. ! 

1
 $        
     
 .9.  " 4
  / 0   "

AB  ?àB       


$
    3&  "  |
a am  2 3
.!"    

 !" 1   
    $  

   +  
 .9.  

. a "

 
 · 
"( ·  ·   &
· ·· /45/6&&

· am!"

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,CLASS=A,


//STEP1 EXEC PGM=SAMPLE,.

1
 A     
  ! & 
 +     " 1
  
 
  !  
 !$  $$  |  ´ 
 "
 
a am  2 
.!"    
 !" 1   
  

   +  
 .9.  
. a "

 
 · 
"( ·  ·   &
· ··  /476&&

   $ ?àB ! 4     


 !  &4 
 

/?àB0 & +4  
        "

· am!"
· ··  · %

     (
· ·· · %

 ^
a am  2 ·3
.!" @&  
 !" 1  
  +   & 
 
    #"
. a "
 
 · 
"( ·  ·   &
· · ·· /456-·"----&&
?.Aà8B@  ?.Aà8B
( 8  
   $(
6 
 6ºX666     @
6 
 6ºX     
@( @ & ( $ &

 º
· am!"

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,CLASS=A,..


//STP1 EXEC PGM=MYPGM1,REGION=1024K

//ABC JOB ACCT123,¶PROGRAMMER NAME¶,CLASS=A,..


//STEP1 EXEC PGM=MYPGM2,REGION=10M

, 

 à-  4 
 ?.Aà8         
 .9.  "
     

  4 
      
 .9.    

 
 à-  " 4 
    
 .9.       
 

 
 à-  "

  
a am  2 ·
.!" @&  
 !"1
 1.         & 
  + $
 p 

        
 "
. a "

//JOBNAME JOB ACCTINFO,¶PROGRAMMER NAME¶,CLASS=A,..


//STEPNAME EXEC PGM=PGMNAME,TIME=(mm,ss),.

1. B )4 *


· am!"

//JOBNAME JOB TIME=(1,30)


//STP1 EXEC PGM=ABC, TIME=1
, 

 à-  4 
 1.        

 .9.  "
     

  4 
      
 .9.   

  
 à-  " -4 
      
 .9.       

 

  
 à-  "
a am  2 #
.!" @&  
 !" 1     
 $  
  $ +  
  "
. a "

//JOBNAME JOB ACCTINFO,¶PROGRAMMER NAME¶


//STEPNAME EXEC PGM=PGMNAME,PARM=¶Parm¶

· am!"
//JOBNAME JOB ,,NOTIFY=¶JSMITH¶
//STEP1 EXEC PGM=SAMPLE,PARM=¶ABCDEFGH¶
1
  + $
 
         
 $  
  |66 &"
-4 
 &  
 ! &  &    
 $$  
   ! 3 " 1

   
 $
 
   " 4 
 $  
     

   &  
 $$  
   ! 3  

  
    

     $$ &  
 ^ &  "

 X
a am  2 #ÿ  &

a  h!  #     am

//JOB1 JOB ACA123),¶ANDREW¶, CLASS=A,MSGLASS=A


//JOBLIB DD DSN=MAIN006.X100.LOADLIB,DISP=SHR
//STEP1 EXEC PGM=Sample,PARM=¶PRINT¶
//DDIN DD DSN=MAIN086.INFILE,DISP=SHR
//DDOUT DD SYSOUT=*

 ´
a1a1a  1a   a%
 

LINKAGE SECTION.
01 PARM-FIELD.
05 PARM-LENGTH PIC S9(04) COMP.
05 PARM-INDICATOR PIC X(05).
PROCEDURE DIVISION USING PARM-FIELD
A000-CHECK-PARM.
IF PARM-INDICATOR = µPRINT¶
NEXT SENTENCE
ELSE
PERFORM 0100-CLOSE-FILES

     7   


 $ /?810"
 !$
 
 $
 
  "

 Ë
· am! ·(· a m 

'$      .9.    ! à-

//JOBNAME JOB NOTIFY=¶userid¶


//STEP1 EXEC PGM=MYPROG,REGION=4M,
// TIME=NOLIMIT
//STEP2 EXEC PROC=MYPROC
//STEP3 EXEC PGM=MYPROG,PARM=¶E001BROWN¶

6
UNIT 4

a·#·· 

|
h a m 
à "
   
 %%  "
& +"
  "
" %8
" %
" ,.
" à
" p81
" %-
$" Càp1

1  &   


? 3
   %%  
%     

 

p  
    
 %%  

  
        
 %%  

-    4         

  %%    $  


 7

^
 !  h a m

1
 %%    7  
 $  
|" 1  
         
     &   
" 1        7 & 
^" 1  &  
      7   $    
º" 1       &    +$     
 
&  
 7
 
 +$ 
 " 1      
 
       $  
  +$  
 
" 1  
            
  

 %%          .9.  " -4     %%  4
  
 4    & .9.    
  "

, %%        .9.   


    $

 + .9.  " 1
 +   %%         

 .9.   º
. a
1
 %%        3&  "
//DDNAME DD DSN=X.Y.Z,DISP=NEW«
· am!"
//DDIN DD DSN=MAINUSR.COBOL.INPUT,DISP=OLD
//DDOUT DD DUMMY

1
   & 3&   
     $ 
%%  4 
 
 " 4 
  &      ! /%pC0"
1
 +     
        
 "

p & /%pC0  


 &     %%  4  3&  
  "   
 3&      
    
 
  
     $& 
      "


a am  2  ÿa a  am&

.!" @&  


 !" 1  & 
    
   

. a "
//DDNAME DD DSN=MAINUSR.X.Y

· am!"
//DDIN DD DSN=MAINUSR.COBOL.FILE
//DDOUT DD DSN=MAINUSR.DB2.FILES(DCLGEN)
1
 %8       & 
    
   4 

  & 
  "
1
  
 %%     
    & 
 $ " 1
   
 &            7 & 
 $ "


a am  2 ÿ!  &

.!" @&   


      
 !" 1  &

ö 1
    
     
 $$  
  "
ö
      
     
     &"
ö
      
     
  "

X
· am!"
//JOBNAME JOB ,,CLASS=A
//STEP1 EXEC PGM=SAMPLE1
//DD1 DD DSN=MAINUSR.COBOL.INPUT,DISP=OLD
//DD2 DD DSN=MAINUSR.COBOL.IN,DISP=(SHR,UNCATLG,DELETE)
//DD3 DD DSN=MAINUSR.COBOL.OUT,DISP=(NEW,CATLG,DELETE),
// VOL=SER=SYSDA,SPACE=(TRK,(1,1))
//STEP2 EXEC PGM=SAMPLE2
//DDIN DD DSN=MAINUSR.VSAM.IN,DISP=SHR
//DDOUT DD DSN=MAINUSR.VSAM.OUT,DISP=MOD,
// VOL=SER=SYSDA,SPACE=(TRK,(1,1))

1
  +      à-"  
   4 
 $  ,.| 7

   
      & 
 %%   %%|4 %%4  %%^"
 
  %%   )%%|* 
 %8     

&     
%     
 
     & +  
    +  

    )%Bà%*"

 
  %%   )%%* 
 %       
 +$     

  
 
         $     
 $ "   
 $ 
   &      
   "

 
 
 %%   )%%^* 
 %     
         "
,    
 $        $ 
   " 4  
 $   
 & 
 
    
  "

1
 %        &  
     & +     $$ 
    "    
      
     
 $   
 &4       &    "

1
 %     
           %"
1
   %    DISP=(NEW,DELETE,DELETE)


a am  2 ÿ  &

  ,  , 


-  8  , 
-$    

DISP B )HHHHHHHHHH4HHHHHHHHHH4HHHHHHHHHH*

8. 4 ,1A4 ,1A
à% p8,1A p8,1A
? @.. @..
à% %..1. %..1.
,

X6
8. G %     +  
 $$  
       "
1
   7 $       3  4 
 %   -3 )%-*"  %B8. 
  $    " %B8.
 &     
     "

à% G %   +  


 $$  
   
     +  &

  4 ""  
     
     
  
 +"
,4    $   
   4 
     +$ ""

 %Bà%    +$   " %Bà%  &  
  
     " 1
 &   
      "  %Bà%
    4 
 &    
 $$  
      
+$   " 1
 &   !! ).à'*  $ 
   "

X|
? G %   +  
 $$  
   
     
  

 4 "" & 
      
      
 
  
 +$ 4 &  
 " 1
   
  
     %Bà%
 
   "

 %B?    +$      


    
    

   "

à% G     +4     +  )%Bà%* 4    $


  4  
   
   
   "  
      + 
 
  
   8. "

 %Bà%          


 $     +$
  "  %Bà%    
      +4 
   
   %B8. "
X
a am  0 #·

.!" @&   


      

 !" 1  & 
     7     
. a " ,.B)4) 44*4?.*

(
p !   
  &  
      "
  (
1?@ G 7     $  
         3
C G 7     $  
        &
!8    
   
  & 7 &           

  
 !8    
   
  & 7 &      
  &
7 &  +

 !8    
   
    & 3  % ) *
X^
%& -3   
 %& -3 
     
" ,&  
$  
 #     %  " $ #  
   
3 $  $
   
&  7    "

?. ?  &   &    


      & 
 
 
  
 +"

· am!"
//DDOUT DD DSN=MAINUSR.COBOL.OUT,DISP=(NEW,CATLG),
// SPACE=(TRK,(2,3,1)RLSE),VOL=SER=SYSDA

 
  +  4 ,8p?"à-à"àp1       )%* 
    
 & 3     4  
   7
     3" 1
  & 7 &    3   &  
  3"


a am  0 
p·
.!( @&   
   3&     

 !"1  & 
       


    +    
 "
. a "
àB.?B! ! 

      


   !       
   



         "

àB?.'B  $!  ! 


 &     & 
      $        &$ 

! " 4 
           ) $  

 *  
     


   $   4   

  "

· am!"

//DDOUT DD DSN=MAINUSR.COBOL.OUT,DISP=(NEW,KEEP),
// SPACE=(TRK,(2,3,1)RLSE),VOL=SER=LP2WK1

                   


 
$ 
 %   @..   
    
    $"

'     


  $$     $ 
      
   "


 &    $ +$    
      
 
   "
1
 à     
  $     $    $   "

X
a am  0 p 

.!( @&   



     "

 !( 1  & 
 &    
       
 
 "
. a "
UNIT=Generic-unit-name
or
UNIT=Unit-model-number
or
UNIT=/Machine-address

A!! ( C%, & % , %


1,. & 7  , %
C2 & %  7 
,  XX
p!! ( Ë^º 
^^´6 %,%
^^Ë6
^ºË6 1 

 
! ( 1
   !    
 

· am!"

//DDOUT DD DSN=MAINUSR.COBOL.OUT,DISP=(NEW,CATLG),
// SPACE=(TRK,(2,3,1)RLSE),VOL=SER=LP2WK1,UNIT=SYSDA


a am  2 %ÿa a %1&

.!" @&   


   3&  
 !" %-     
 &  
 
   
    $
4 
 
   
   
 -3 #"

Syntax: DCB=(LRECL=nnnn,BLKSIZE=nnnn,RECFM=record-format)
 G   

·
G 1
 $  ? $
!   
  + $
   

  "      $  |  ^X6 &"


%
/*· G 1
 -3 # !   
  + $
 3  
   "    
 $  |´  ^X6 &"

·- G 1
 ? '  !   
    
   
    "" +4
  4 34  "

!  ! ' '+ $

'- '+ $


-3
    $

-    $
-3
p p

´6
· am!"

//DDOUT DD DSN=MAINUSR.COBOL.OUT,DISP=(NEW,CATLG),
// SPACE=(TRK,(2,3,1)RLSE),VOL=SER=LP2WK1,
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=8000)

' 
 ?.'  4    
       
   

?.'  " 1
& 4
! ,  
      $!  
   
 
&"
!    
     
!    
 

 
 
   $!  
   
  &"
!   
  #  & + 
 3 #"
! 1  
   &  $$ 
 
  3  &  
 "

, &     


 
      & 
 $ 
  

%-  " 4  
 %-     
  
   4 
4    
 
 %-  "
´|
a am  0 4p

.!"   3&  

 !( 1  $     


 Càp1   

. a "
SYSOUT=class value
or
SYSOUT = * )  
 A,    
 à-  *"

´
· am!"
//DDOUT DD SYSOUT=A
//DDOUT1 DD SYSOUT=*

 4 
 Càp1   
    &  
 %%  "

p 
 Càp1    &     
      &     
 
     & ."

· am!"
//SYSPRINT DD SYSOUT=*

% 
         C?81  
 &    "

´^
m! a .a a 
1  &        
  $   &  
   

 " , 
   
  4 
   &         

 +  "

1
        &     )8. 4%..1.4%..1.*

,   &      


       
    " 1
  

 &  7 
      &   (

m h 
//A DD UNIT=SYSDA,SPACE=(CYL,1)

 
   
 &      &   
$ ºº!
   " 1

&   4 4  
    
     
    7"

´º
2  a am     h '' h a  ''W/
//B DD DSN=&&WORK,UNIT=SYSDA,SPACE=(CYL,1)
1
 &      &   
$ ºº!
   " 1
 &
  4 4  
    
      7"

3  a am     h ' h a  '·


//C DD DSN=&TEMP,UNIT=SYSDA,SPACE=(CYL,1)
1
 &      &    
ºº!
   " 1
 &  
7    $  4   
  " 8  + &
FF     
 + & F"     
 4 %8BF1.4 

F1.       &     &    )    *"

´ 
m! a .a a ÿ  &
1   $&  
 4 %8BFF1."
 &     &     
 4 %8BFF à?@  %8BF à?@4  

    4 
 &    
   
     "
C       &    & $ 
 %8   "
1     &   (
%8BF1  

%8BFF1  

 1    &    ´ 
   "
· am!"
%8BFF1.'.
C    
    & $ FF1.'. 4  & 
 & 
$  $         7  

 p %4 1  " 
   7"
1   
      
   4 
   &   
   
 
 +  & $ ,  
   !   
 %  "
       
    & $    )F*  
   $
´ 
  & 
    & !   )    *  
    "
  a1

C     3  & 0    + &  


     "

1
   
 /;0   
 3    $ "
DSN = *.DDNAME
*.STEPNAME.DDNAME
//STEP1 EXEC «««««

//DD1 DD DSN=A.B.C, ««««

//STEP2 EXEC «««««.

//DD2 DD DSN=*.STEP1.DD1
//

´X
Syntax:

Parameter=*.STEPNAME.DDNAME

? 3  

 &          3       " ,


3   )  3*          
   
  $       &   "

, 3  
 
 (

*.NAME OR *.DDNAME

*.STEPNAME.NAME OR *.STEPNAME.DDNAME

*.STEPNAME.PROCSTEPNAME.NAME OR *.STEPNAME.PROCSTEPNAME.DDNAME
´´
!a am

C    &    & %%    


      

   
 $  
 &   
 $ )* 
  $ +"

-    
   %%   

     $     "
·
% %   
  & %  
  ! $ +  
 
%
% %   
  & %  
  !   
    
 
4  %           
4p %        &  $
4 %           $ 

8 
  %%  
     $   $ 4   &   
$   

 $ 

´Ë
·
%
1
 ::1.- %%    
   $   
 $&    

$  $ +"
    4 
   &    
 ::1.- %%
    
  
 &  
 
     &4 C|"8@-
MY.LIB1SYS1.LINKLIB::- à- à- ´´XX4,B1
//ONE EXEC PGM=FIRST MY.LIB1
SYS1.LINKLIB
//STEPLIB DD DSN=MY.LIB1, DISP=SHR
----------
SYS1.LINKLIB
!!!!!!!!!!
//TWO EXEC PGM=SECOND SYS1.LINKLIB

----------
MY.LIB2SYS1.LINKLIB
//THREE EXEC PGM=THIRD MY.LIB2
SYS1.LINKLIB
//STEPLIB DD DSN=MY.LIB2, DISP=SHR
C           1.- %%  "  &   

     
  
    "
1.-  à--  
  4 


 
 1.-  " Ë6
%
%

//ZEBRA JOB 66,CLASS=T


//JOBLIB DD DSN=MY.LIB,DISP=SHR
//ONE EXEC PGM=FIRST

//TWO EXEC PGM=SECOND


--------
--------

//THREE EXEC PGM=THIRD


 
 :: à-- %%    &     &:   
 &  
 
  
$   
  "
1
 :: à-- %%       
  .9.  
C           à-- %%  "  &   

     
  
    "

Ë|
a a  a  a 

//INDATA DD DSN=USERID.INPUT.FILE1,DISP=SHR
// DD DSN=USERID.INPUT.FILE2,DISP=SHR
// DD DSN=USERID.INPUT.FILE3,DISP=SHR
//OUTDATA DD DSN=USERID.OUTPUT.DATA1,DISP=OLD
// DD DSN=USERID.OUTPUT.DATA2,DISP=OLD
// DD DSN=USERID.OUTPUT.DATA3,
// DISP=(NEW,CATLG,DELETE),
// SPACE=(TRK,(1,1),RLSE),LRECL=80,
// BLKSIZE=6160,RECFM=FB,
// VOL=SER=LP1WK1,UNIT=SYSDA

Ë
    
 
   $         3$ 
 
  $
  
     
 $ "

                  


        

   ""    $  
  4  
      
  4
 

       
      " à& 
  
 &
 
 !! "

        4 $     


    " à  
    

     +
4 
 +     
         4  "

Ë^
p  6

p
·

˺
p  
{ à 

{ à:^Ë6 p

{ p&   

{ p&    & +

{ .-A.8.? p&

{ .-1 p&

{ .1 p&

{ .-àC p&

{ .?àA p&

{ .-p%1. p&

{ %, p&
Ë 
{ à?1 p&
 

{ p  
    p&"

{ @
    p"

{ p  
    p"

Ë
,75p  

{ p  -!  $  


        
7& $  3  
 à:^Ë6 "

{ p    %,%4   4   


  "

{ p     4   4 4   $    $   4   
 
   1à ) 1   *"

ËX
p  .a a 

p   &       $(

{ %   p ) + 


.-*

{ & p ) + 


.*

%        &4 4   4 $ #4       


   
:  "

&      1à  4  &4 4   $    $   4
              "

Ë´
p  .  a m ÿ4 &

%$ +4       


       
 %%  
C8" 1
       $  
 %%  "
      7 
 &
   
 %pC  
 
 %%  4  
 $  +   3    ) 
  
  *"

1
    


 C8 %%      (
//SYSIN DD *
----Control statements-----
/*

,
  &   
 C8    
      
 %"
1
 
 C8 %%     (
::C8 %% %8B,8p?"1"-).*4%B?

ËË
p  .  a m . a

1
 $     p&     (
a8! a  ! a mm 

(
-
     "
    7"
    7"
    "
p&         | 
 X|"
   +  X|4 

|" - 3 
     X|    "
"  !  3 
    X"
^"  
     |  
 $ "

|66
h·%3· ·p  .

.-A.8.?     &    4  &4   7    

· am!"
//JOBNAME JOB ACCT,¶APARNASANDEEP¶
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MAINUSR.SEQ.INPUT,DISP=SHR
//SYSUT2 DD DSN=ABC.SEQ.OUTPUT,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(1,1)),VOL=SER=LP1WK2,
// RECFM=FB,LRECL=80,UNIT=SYSDA
//SYSIN DD DUMMY

|6|
 
  +  4 
    ,8p?".2"8p1  $    
   ,-".2"àp1p1"

! 1
 .9.     
 $    + ).-A.8.?*"
! 1
 C?81 %%    
  $   "
! 1
 Cp1| %%    
     "
! 1
 Cp1 %%    
      ) 
  
Cp14 
  
  |44^*"
! 1
 C8 %%    
    " 1
  
 .-A.8.?
3  & &   "
 %pC   4 
 
    $ "

|6
h·%3· ·p  .
1
 +   

 .-A.8.?       &$  $   
  "  
  4    ,8p?",-"?.   "

· am!"
//JOBNAME JOB ACCT,¶APARNASANDEEP¶
//STEP1 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MAINUSR.ABC.REC
//SYSUT2 DD SYSOUT=*
//SYSIN DD *
GENERATE MAXFLDS=2
RECORD FIELD=(10,20,,1),FIELD=(10,1,,15)
/*
//

|6^
1
  + .-A.8.?    
 Cp1           "
! /C8 %% ;0   
         
  "
! 1
 A.8.?,1.     
 $  
        "
! ,9'%B   
   
        
  7
?.à?%  "
! 1
 ?.à?%     
       
 
 '.%  "
! . 
'.%     
 0 $
4     
   4

 &         
 4  
  
     

  "
1
   (
'.%B).8A1 à' '.%4à1à8 8 8p14 à8.?à84 à1à8 8 àp1p1*
1
 '.%    
  +     (
!  
 |6 &  $   6  
     
 |6 &  $  |
 
   I
!    
 |6 &  $   |  
     
 |6 &  $ 
|   
   

|6º
h·%ap  .

.-1      


       " .$  
   
      
  "

· am!"
//STEP1 EXEC PGM=IEBPTPCH
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MAINUSR.ABC.REC,DISP=SHR
//SYSUT2 DD SYSOUT=*
//SYSIN DD *
PRINT TYPROG=PS,MAXFLDS=2
TITLE ITEM=(µEMPLOYEES PROFILE¶,27)
TITLEITEM=(µNAME ADDRESS¶,15)
RECORD FIELD=(8,2,,10),FIELD=(5,10,,20)

|6 
! 1
 ?81      
 
   
  $ #  
&  7 
 
  +         "
! 1
        
 11.   "
! /.àC.. ?à'.0      X  
   
! /8,.0  /,%%?.0      
 +  4 $$   | 
! 1
 ?.à?%     
       
 
 '.%  "
! . 
'.%     
 0 $
4     
   4 
 &  
      
 4  
  
     
   "
1
   (
'.%B).8A1 à' '.%4à1à8 8 8p14 à8.?à84 à1à8 8
àp1p1*
! 1
 '.%    
  +     (
 
 ´ &  $     
     
 ´ &  $  |6  
  
I
   
   &  $   |6  
     
   &  $  6 

   

|6
h·a
p  .

1
 .1 &   (
   %,% 1à ) 1   *
   % %&"
   &   $

· am!"
//STEP1 EXEC PGM=IEHLIST
//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=OLD,UNIT=SYSDA,VOL=SER=ABC
//DD2 DD DISP=OLD,UNIT=SYSDA,VOL=SER=DEF
//SYSIN DD *
LISTVTOC FORMAT,VOL=SYSDA=ABC
LISTVTOC FORMAT,VOL=SYSDA=DEF X
DSNAME=(MTPL.FILE1,MTPL.FILE2)
/*
//

|6X
1
  +    .1    1à $(
1
 .1 3  &      

C8 %%  (
1
  11à    7   
)'à?,1 * 1à $  3 ,-" 1
  %-   
   "  'à?,1  4      "
1
  11à    7   1à $
    ( 1"'.|  1"'."

|6´
· am!)"

//STEP1 EXEC PGM=IEHLIST


//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=OLD,UNIT=SYSDA,VOL=SER=ABC
//SYSIN DD *
LISTPDS DSNAME=MTPL.FILE,VOL=SYSDA=ABC
/*
//

1
  +    .1     % &"
1
 1%    7 $  
 &  
 %4 1"'."

8à1.( %8,.       %8    

|6Ë
h·%4p  .

1
 .-àC     &       "

1
 àC    
       & $  
 %%8,.
 
 " 1
   (

COPY OUTDD=output-ddname,INDD=input-ddname

1
 ..1    
    
 %    " 1
   (
SELECT MEMBER=NAME )  & $  *
!!
SELECT MEMBER=(NAME,NAME,NAME) )  &    *
!!
SELECT MEMBER=(old,new,R) )  &    
$   *

1
 .9p%.     
    
    +  
  
 
 .9p%.  " 1
   (
EXCLUDE MEMBER=NAME )  & $  *
!!
EXCLUDE MEMBER=(NAME,NAME,NAME) )  &    *
||6
!. a ·  

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN DD DSN=MTPL.FILE1,DISP=SHR
//OUT DD DSN=MTPL.FILE2,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
/*

1
  +       
    
 %4 /MTPL.FILE10  
+$ %4 /MTPL.FILE20"

1
 8  àp1 %%          & .-àC"

1
 àC      
      %%8,."
8 ..1  .9p%.    "

|||
!. ! m 

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN DD DSN=MTPL.FILE1,DISP=SHR
//OUT DD DSN=MTPL.FILE2,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
SELECT MEMBER=ALLOCATE
SELECT MEMBER=((PROD,TEST,R))
/*

1
  +     
     J,à,1.K  
 %4 /MTPL.FILE10  
+$ %4/MTPL.FILE20"

1
 ..1      
   ,à,1.       
   

     "

||
!.  !! m 

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN DD DSN=MTPL.FILE1,DISP=SHR
//OUT DD DSN=MTPL.FILE2,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
SELECT MEMBER=(FILE1,FILE2,FILE3)
/*

1
  +         
 %4 /MTPL.FILE10   +$ %4
/MTPL.FILE20"

1
 ..1      
  ( '.|4 '.  '.^    "

||^
!. a  am ! m 

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN DD DSN=MTPL.FILE1,DISP=SHR
//OUT DD DSN=MTPL.FILE2,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
SELECT MEMBER=(JOBA,(PROD,TEST,R))
/*

1
  +     
     J?à%K  
 %4 /MTPL.FILE10
  +$ %4 /MTPL.FILE20"

1
 ..1     (
{  & 
   à-,
{ 
   ?à%       
 $  
!   ?à%  1.14
!  & 
     1.1  
     4
!    & 
   +  
         " ||º
!. p ·(
p·

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//IN DD DSN=MTPL.FILE1,DISP=SHR
//OUT DD DSN=MTPL.FILE2,DISP=SHR
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
EXCLUDE MEMBER=ALLOCATE
/*

1
  +        /MTPL.FILE10 +  
   /,à,1.0

|| 
m!  a a 

//MODAL2 JOB µ0.2AMIP¶,«««.


//STEP1 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//INPDS DD DSN=MTPL.FILE1,DISP=SHR
//SYSUT3 DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSUT4 DD UNIT=SYSDA,SPACE=(TRK,(1,1))
//SYSIN DD *
COPY INDD=INPDS,OUTDD=INPDS
/*

1
  +     
   & /MTPL.FILE10"
8 
 
   %%       

 8%%  àp1%%  "

||
h·a3p  .

1
 .?àA   (
!  
)*   
! ?     %
!   $    $   
· am!"
//STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=*
//NUM1 DD UNIT=SYSDA,VOL=SER=ABC,DISP=OLD
//SYSIN DD *
SCRATCH MEMBER=ALLOCATE,DSNAME=MTPL.FILE, X
VOL=SYSDA=ABC
RENAME MEMBER=XYZ,DSNAME=MTPL.FILE1, X
VOL=SYSDA=ABC,NEWNAME=PQR
/*
1
 ?,1    .?àA     

  
,à,1.  
 %4 1"'."

1
 ?.8,.     .?àA      9C5  2?
 
 %4 1"'.|"
||X
· am!)"

//IEHPROGM2 JOB A123,¶MAHESH¶,««««..


//STEP1 EXEC PGM=IEHPROGM
//SYSPRINT DD SYSOUT=A
//SYSUT1 DD UNIT=3390,VOL=SER=LP2WK1
//SYSIN DD *
UNCATLG DSNAME=ABC.FILE,VOL=SER=LP2WK1,UNIT=3390
/*
//

 
  +  (

1
 p8,1A    .?àA    $ 
    ,-"'.

p ,1,àA    $   

||´
h·%p·p  .

1
 .-p%1. &     4     & 7    
       "

· am!

//STEP1 EXEC PGM=IEBUPDTE


//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=MTPL.MYPDS,VOL=SER=ABC,UNIT=SYSDA,
DISP=OLD
//SYSIN DD *
./ CHANGE NAME=MEM,UPDATE=INPLACE
JAY HARI 00000050
MARY CHRISTI 00000070
./ ENDUP
/*

 %    
$  
       %4   & $
 
       
      
 %"       
    &  7     4 .-p%1.      
   


$$    
 %" 1
    p     "
||Ë
ö
 
  +  4 
 % 1"C%4       .4 


    


7   )666666 6  666666X6*  
X^ 
 ´6"
 
 .-p%1.   +4 
       
& 
    
 C8    " 1
   p     "

84/
ELIZABETH HENRY 00000030
THOMAS JOHNSON 00000040
RICO BROWN 00000050
TIMOTHY SIMMS 00000060
MARY BAKER 00000070
HARRIET WILLIAMS 00000080

8,/
ELIZABETH HENRY 00000030
THOMAS JOHNSON 00000040
JAY HARI 00000050
TIMOTHY SIMMS 00000060
MARY CHRISTI 00000070
HARRIET WILLIAMS 00000080 |6
h·-%+p  .

1
 &    & &4       

 
      
 %%  &"

p a aaa a 


//UNCATLOG JOB A123,¶SUSAN JOHN¶
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.COBOL.FILE1,DISP=(OLD,DELETE)

 ha a 


//DELETE1 JOB A123,¶ ¶SUSAN JOHN¶
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.COBOL.FILE2,DISP=(OLD,DELETE)

||
a aaa a 

//CATALOG JOB A123,¶ ¶SUSAN JOHN¶


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.COBOL.FILE3,DISP=(NEW,CATLG)

 a #a a 

//CREATE JOB A123, ¶SUSAN JOHN¶


//STEP3 EXEC PGM=IEFBR14
//SYSIN DD SYSOUT=*
//DD1 DD DSN=MAINUSR.COBOL.FILE4,DISP=(NEW,KEEP),
// UNIT=SYSDA,SPACE(TRK,(4,2)),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=800),
// VOL=SER=LP2WK1
//SYSIN DD DUMMY

|
h#p  .
%,     &   4 4  &   
   , 
!,   "
· am!"
//JOBNAME JOB (ACCT),¶SUSAN JOHN¶
//STEPNAME EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
Functional-Commands OR Control Statements
/* (terminator)
//
· am!"
//JOBNAME JOB (ACCT),¶SUSAN JOHN¶
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE MTPL.SEQ.DATA
/*
//
 
  +   
 
  +4 %,  
 !,    1".2"%,1,"
'   %, p&
1
 %, p&    +  
 $   ,   "
{ % 

{     
 |^
{  

h#p  .ÿ  9&

· am!"
//KSDLOAD1 JOB (A123),µSUSAN JOHN¶,
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DDIN DD DSN=FILE1.TEST,DISP=SHR
//DDOUT DD DSN=VSAM1.KSDS.CLUSTER,DISP=OLD
//SYSIN DD *
REPRO -
INFILE(DDIN) -
OUTFILE(DDOUT)
//*
//
,     %
//ALTER1 JOB 23,¶SUSAN JOHN¶
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=A
//SYSIN DD *
ALTER -
MAINUSR.COBOL.LOADLIB (PROGRAM1) -
NEWNAME(MAINUSR.COBOL.LOADLIB (SAMPLE1))
/*
//
 
 ,8p?"à-à"à,%- )?àA?,|*  
$ 
|º
,8p?"à-à"à,%- ),.|*
hp  .

1
 à?1 &     
       $  3&  

  " 1
     
   
   
à?1           .,8" ABà?1  AB.,8
 
 .9.    3 %'à?1 $  

   $
     "
1
 à?1        
 C8 %%  "

· am!"
· ·· 
 22 !
" 22 2 "&·9&"2"2
 22 2 "&·9#&2"2
" 22 !
 ("·2)##  *
!

| 
1
  +     
   
         
 à?18 %%
    
     
     
 C8 %%"
1
         
         
 à?1àp1 %%  "

h·(· a m  1 h!  am


G h  a m    h ! a a 
® hp a m    h ! a a 
G h4  a m    h a a 
G h  a m !  h!  $  h$  ma a     

1
  +    
   $ ),* 4 $ 
  & )*
 
    )*  $    |"

|
hp  .ÿ  9&

· am!)
//SORT1 JOB (A123),µSUSAN JOHN¶,NOTIFY=&USERID
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=A
//SYSPRINT DD SYSOUT=A
//SORTIN DD DSN=MAINUSR.ADDRESS.BOOK1,DISP=SHR
//SORTOUT DD DSN=MAIN006.ADDRESS.BOOK2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(CYCL,(2,1),RLSE),VOL=SER=LP2WK1,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=800)
//SORTWK01 DD UNIT=SYSDA,SPACE=(CYL,(20,10),RLSE)
//SYSIN DD *
SORT FIELDS=(2,3,CH,A)
/*
|X
1
  +    $  
 ^! & $ 

    "

, ,8p?",%%?."-àà@|  
   
 
 

{ 6´Ë|^º ! "   


48 
{ 6|^º  ! " 
 &4 
{ 6º^º  ! " , 
 48C3

,    


     3  
"

{ 6|^º  G " 
 &4 
{ 6º^º  ! " , 
 48C3
{ 6´Ë|^º ! "   
48 

|´
h·3·p
4

1
 .?A. &            $  

-
% ,
' -
 
%
,
  .&
  '
.&

1
   3     |        
  $ 
    "
. 
 
        &   
   7  
 $

 
  +         $  $    "
.+  
· ·· " · 
 22 !
" 22 2&·92"2
"# 22 2&·9#2"2
 22 2&·9'2"2
" 22 !
·· ("·2 )##  *
!
1
 $          
  
 "        &   

   7"
  
 
    4 
 
 $         
 ( |Ë
.?A. '.% B)|444,*
pnit · rciss

 h   .a   a $!. !  : aa a 

) h   . aa a  #$  0#a a 

, h   . !. h   m  a  h 

+ h  am  h  a m ÿ&  a  .!  am

6 h   . !   h   aa a 

; h   .   h   a#

<h   . h !  am  a  ! a a 

|^6
pnit   · rciss

Ô    
                
            

 a ah.a: aa a

|"  & %   /" "8104        à-1.1 "

"  à-   $ 


 $  "
!    ! C p F    
 
! ,  ! &     
! $    ! p
!  $ F &  $ !      9
!  $ 
    
 1à  
 à- $   "
!  + +  |6 "

|^|
·%3· ·

 ,:  ;,< =4>   50;< ,4 ,:; =&

^" ,    ::1.|  + 


 $  .-A.8.?"

º"   %%     C?81"  


  

Càp1  
          
 à-  "

 "   %%     Cp1| $  


  
à-1.1  
   & /" "810

"   %%     Cp1"  


  
      " ",- , 
 à-1.1     "

X"   %%     C8     


   +"

|^
´"   &   : $ 
 "

//STEP1 EXEC PGM=IEBGENER


//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DSN=userid.JCL.CNTL(JOBTEST2),DISP=SHR
//SYSUT2 DD DSN=userid.JCL.LAB5A,
// DISP=(,CATLG,DELETE),
// SPACE=(TRK,(1,1)),
// RECFM=FB,LRECL=80,UNIT=SYSDA
//SYSIN DD DUMMY

|^^
·%4

 ,:  ;,< =4>   50;< ,4 ,:; =&


|"  & %   /" "8104   
    à-1.1"
"  & 
     à-1.1 4    
   "
^" ,    ::1.|  + 
 $  .-àC"
º" ' 
  (

"  & 
   / à-1.10  " "81   %
  " "81|
" ?  / à-1.10  /àC| $ 
  &"

//STEP1 EXEC PGM=IEBCOPY


//SYSPRINT DD SYSOUT=*
//IN DD DSN=userid.JCL.CNTL,DISP=SHR
//OUT DD DSN=userid.JCL.CNTL1,DISP=(NEW,CATLG),
// SPACE=(TRK,(2,3,1)RLSE),VOL=SER=SYSDA
//SYSIN DD *
COPY OUTDD=OUT,INDD=IN
··  ·
·)) 
·# ** |^º
p81 

·p·

|^ 
  
 

  

     $ 

1
 ?à  .8%  

$    

$   $ 

1
 -  

&$ %%    

&$ .9.     |^


 

p  
    

   

  &  !  & 


  $ 

p &         

   &     7&   

|^X
Wha a  

,    $    +      à-  "


1
   
    .9.   $ 

  
%%  "

,   $ &      $  


 &   +
   "    $ 
     &4 &   3 
   
    
 + 
    &   7"

1
   &   (       $ "

JOB
 |

Execute P1
Execute program Mypgm

|^´
-  $ (
|"     & $ 
  7   "
" 1
&     &  $ &  $    "
^" 1
&    & $    $$ "

1 + 4  .9.    7 $ 



 ! "

· am!"

//JOBNAME JOB NOTIFY=&USERID


//STEP EXEC PROC=procedure name

,          


 .9.    
    

 
 /?àB/ & +4 
(

//JOBNAME JOB NOTIFY=&USERID


//STEP EXEC procedure name |^Ë
a a  

,  

     &    ,1,àA.% ?à.%p?."

EXECUTE CATPROC

PROCEDURE
CATPROC,1?à
EXECUTE CATPROC

'$ !

         4      &    "

     & 
 ?à      $   $& 
 $$  
 "
4    4 
        
      &   "

1
 .8%        &    $ "
|º6
  am  


 &  
   
     4        

JOB
 8?à

Execute INPROC
Execute INPROC

'$ !^
,    $ 
?à     
.8%  "

,      $  $ 


 à-  "

     &  + & 


    


&  "
|º|
  a   a

L à-  
L %% ;  
L %% %,1,  
L %   )/:;0  & X´  3*
L 8   )/::0  & X´  3*
L 8!    ) +  4 .  &   *

|º
ha ·  a m    am  

//JOBNAME JOB NOTIFY=USERID


//CREPROC PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.JCL1.CNTL,
// DISP=(NEW,CATLG,DELETE),
// VOL=SER=LP2WK1,
// UNIT=SYSDA,SPACE=(TRK,(1,1,1),RLSE),
// DCB=(BLKSIZE=800,LRECL=80,RECFM=FB)
//SYSPRINT DD SYSOUT=*
// PEND
//*
//JCLSTEP EXEC PROC=CREPROC
//SYSIN DD DUMMY
//*

|º^
1
 ?à   $ 
 $$  "

,     $ 


?à  "

1
    
    & 
 ,-.   
 ?à
  )?.?à *"
  
    
    & 

à- 
 +$ "

1
 .8%     
    "

|ºº
 a   am  

//MYJOB JOB NOTIFY=USERID


//MYPROC PROC
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
// PEND
//*
//JOBSTEP EXEC PROC=MYPROC
//SYSIN DD DUMMY

|º 
Dtnti

//MYJOB JOB
//*JOBSTEP EXEC PROC=MYPROC
//* This is what the system visualizes
//STEP1 EXEC PGM=IEFBR14
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY

 
 +  4 
    $ 

 ?à     

 .8%
 "

1
     /C?à0 

    3 
   
 .9.
 "
|º
  a a a   

//MYJOB JOB
C?à 
//STEP1 EXEC MYPROC
//SYSIN DD DUMMY ::C?à ?à
::?à1. .9. AB,
::C?81 %% Càp1B;

During Run-time

//MYJOB JOB
//PROCSTEP EXEC PGM=A
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY

|ºX
8 
 
 .8%      &    $ 

1
      


   $     
    

4 

    3    "

,       $ &  $     


 &    (

C|"?à- G -!  &    &"

& ?à- !  &    "

, ! ?à- G à:^Ë6  :.,  º  $




p 
 .-p%1. &  ':%'       & "
).-p%1.     
 +  *
, ?à      $              "  &
       &  "
|º´
h 

% a m
1
 -      & )%* 
     $ "  $

 -    
   
  
    
  $ + 

  "
.+  (   
 a ."MAINUSR.JCL.CNTL(JCLPROC)
//JCLPROC PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.PROC1.PROC,
// DISP=(NEW,CATLG,DELETE),VOL=SER=LP2WK1,
// UNIT=SYSDA,SPACE=(TRK,(1,1,1),RLSE),
// DCB=(BLKSIZE=800,LRECL=80,RECFM=FB)
//SYSPRINT DD SYSOUT=*
// PEND
//*


//CATGC JOB A123,¶SUSAN JOHN¶,«««..


//DD1 JCLLIB ORDER=(MAINUSR.JCL.CNTL,..)
//CREAT EXEC PROC=JCLPROC
//SYSIN DD DUMMY
//* |ºË
    a

    
 .9.  %%    ?à    4   


    ovrrids"

  + 
 3   4   .9.  " 1
 $ 
  
   +  
&  
 & 
$" 4 
  &  
$ 
   $  
 .9.    
 %%
   
 " 1
 
$    
   
  &"
  ·(· a m   

1   .9.  4 J  "  B K    


 $
   $  4  J  "  BK    
 &$
 "
1
 A      "
, $ .9.       
 .9.   
 3 

"

,   .9.        $


    7  " | 6
p
·   a m   

1  &    %%      %%    


  
 $  (

::  "  %% $  

1
 7  $ %%     
    
 7  

 $   "

,   %%     


       0 $  "

| |
  ·(· a m  a  
//MYJOB JOB NOTIFY=USERID
//MYPROC PROC
//STEP1 EXEC PGM=IEBGENER,TIME=NOLIMIT,REGION=4M
//SYSUT1 DD DUMMY
//SYSUT2 DD DUMMY
// PEND
//STEP2 EXEC MYPROC,TIME.STEP1=10,REGION.STEP1=
AT RUNTIME
//MYJOB JOB NOTIFY=USERID
//STEP1 EXEC PGM=IEBGENER,TIME=10
//SYSUT1 DD DUMMY
//SYSUT2 DD DUMMY
1
 & +  $  .9.   
Parameter.Procedure-stepname=value
 
 +   (
L 1
    
 1.  
  
$  8à1  |6
| 
L 1
 ?.Aà8  
  
   a m  a  

//MYJOB JOB
//MYPROC PROC
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.JCL.PDS,DISP=SHR,VOL=SER=LP1WK1,
// LRECL=80
// PEND
//STEP2 EXEC MYPROC
//STEP1.DD1 DD VOL=SER=LP2WK1,LRECL=
//STEP1.DD2 DD DSN=MAINUSR.COPYLIB,DISP=SHR

| ^
#p ·

//MYJOB JOB
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.JCL,PDS,DISP=SHR,VOL=SER=LP2WK1
//DD2 DD DSN=MAINUSR.COPYLIB,DISP=SHR

1
 & +  $  %%   
//PROC-STEPNAME.DDNAME DD Parameter-modifications
 
  +  
{  %%|4 | @|   
$   @|
{ 1
 ?.      ) *
{ ,  %%   %%   

| º
.m!a am  

, &            &       .9.


   %%  " &       4 


  

    
$ 
 
    "

, &        &     )F*    


 +  ´ 
  $"

1
      
 &         
 ?à  "
1  
     & 
   
    
 &   
 
 .9.   
 3 
 "

|  
&       & 
 &   
  
 
 "

//MYPROC PROC A=LP2WK1,B=SYSDA


//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.ABC.INPUT,DISP=SHR,
// VOL=SER=&A,
// UNIT=&B
// PEND
//STEPX EXEC MYPROC,A=LP1WK1,B=SYSSQ

| 
# p ·

//STEP1 EXEC PGM=IEFBR14


//DD1 DD DSN=MAINUSR.ABC.INPUT,DISP=SHR,
// VOL=SER=LP1WK1,
// UNIT=SYSSQ

 
  +  4 ,  -  &   "   
!$ 
  
 
 à  p81  4 
&
  $ 
      

&   "

      
$ 
    
 &    
 
  
 4 
        
 !     )?à* 
 3"

| X
h· a m
1
 .1    
  &  $$    &   "
//MYPROC PROC A=LP2WK1,B=SYSDA
//STEP1 EXEC PGM=IEFBR14
//DD1 DD DSN=MAINUSR.INPUT.FILE1,DISP=SHR,
// VOL=SER=&A,
// UNIT=&B
// PEND
//SET1 SET A=LP1WK1
//SET2 SET B=SYSSQ
//STEPX EXEC MYPROC
# p ·
//STEP1 EXEC PGM=IEFBR14
// DD1 DD DSN= MAINUSR.INPUT.FILE1,DISP=SHR,
// VOL=SER=LP1WK1,
// UNIT=SYSSQ
1
 .1       &
    
 à-    
 | ´
  
 .1 G ! $ &     "
h 
p· a m

1
 8p%.    &   &    &    
 %)* 
 
 -  "

   
  & ?à  4 8p%.  &   $     

 &        "

COMMON.PDS
MEMBER (COMMON)

''SYSPRINT DD SYSOUT=*
''SYSIN DD DUMMY
''SYSOUT DD SYSOUT=*

| Ë
//MYJOB JOB
//DD1 JCLLIB ORDER=COMMOM.PDS
//STEP1 EXEC PGM=MYPGM
//INDD DD DSN=A.B.C,DISP=SHR
//INC1 INCLUDE MEMBER=COMMON

AT RUNTIME

//MYJOB JOB
//DD1 JCLLIB ORDER=COMMON.PDS
//STEP1 EXEC PGM=MYPGM
//INDD DD DSN=A.B.C,DISP=SHR
//*INC1 INCLUDE MEMBER.COMMON
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSOUT DD SYSOUT=*
|6
p <

  #
·(·p

||
   a·  

{ à 

{ à8%   

{ '!1.8 ..  

|
 

p  
   
     p  
 
&   à8%     
  $

p  
 '!1.8 ..   
   

|^
 2   

à à-   +$4   


    +  
   


&  "
.     
 +   
   
1
  
     $  
 + " ,  
 #    +4 
  
 
 #   
3  " 1
         $$  6  º6Ë "
 &   !#   )  
  $* (

COND CODE 0000 Program execution was completely successful.


COND CODE 0004 Execution was ok but cause warning messages.
COND CODE 0008 Program execution was seriously flawed.
COND CODE 0012 Program execution was very seriously flawed.
COND CODE 0016 Program failed disastrously.

|º
     ,-.8% "
  1.  &   ),-.8%*4 
   7    & "
   !#  4 $ "
1
 à8%   $ & 
 &   

   
  

+4   
       "
1
 à8%      
 à-  .9.  "
,
  &    +      
 '!1.8!..!.8%'
 4     
 "

| 
Wh.ph a am  

1
     
&   
 à8%  (

|" 1    



   & +$     & "

" 1        


   &  

 " à &     
   
  "
1
 à8%    &   & +     

 
 
   )
 +$ &   
    *"

|
a am  2 

1
 à8%        
à-  .9.  " 1
  
  +  

 
 à8%   3"

'
',. 1?p.
à8
.+  % -&!  

1
 à8%     
     
 
   


 à8%   
    & "  
     
 
     +"

|X
. a
1
    à8%   
à8%B) 4   4   *
)6!º6Ë * A1 4 1
      
 
1 
     "
.2
8.
A.
.
 ·#
A1 $  

1  

.2 7  
8.  7  
A. $  
  7  
.  
  7   |´
· am!(
//STEP08 EXEC PGM=IEWL,COND=(4,LT,STEP06)
,   4 
 à8%     
    

 
   


 à8%        & "
 
     
 
     +"
 
  +  4  º   
 
     1.64 

1.6´   &     +"

 1.6
  1.6´

 à%. .+
&
6666 C -  º    
 6"
666| C -  º    
 |"
666 C -  º    
 "
666^ C -  º    
 ^"
666º C -  º    
 º"
666  8 -  º   
  "
666 8 -  º   
 " |Ë
m!  

C  &  &   $


     $  "

1
   (

COND=(value,operator,stepname),(value,operator,stepname)


 
         
    &! "

1
     à?  
  &   à8% "
,&   
       &!  
  "

· am!(

//LKED EXEC PGM=IEWL,COND=((4,LT,COB),(4,LT,PC))

 
 +  4 
  /@.%0   & +         G /à-0  /0"
|X6
 h a am   h % a m

1
 à-   à8%    
       &    "  

à-  0      4 
   "

1
 à- à8%         &   
  4  
 .9.
     à8%  "

 &    


     
 à-  4 
   " 1
   
$   

   & .9.     à8%    

   
.9.       "

 
 à-         4 
 & 
 
3 
 à8%   

 .9.    
 +  "  
 .9.        4 
 &
&  
   $ $  
 $  4 $   $"

|X|
· am!"
//JOB1 JOB ,'LEE BURKET',COND=((10,GT),(20,LT))
1
 +   3 M |6 $  
 
     6  
 
  
 
  4 
 & 3    $   "  
   
 &
+    "
' +  4      |4 
    4 
 +  
+"
4       4 
     4  
   
 ( 6   
  " 1
 & &    $   "

· am!)"
//J2 JOB ,'D WEISKOPF',COND=((50,GE),(60,LT))
1
 +    & M  6  $  
  7    4  6   
  4
&  
  $   "M  
 4 
    $  
   
 | 
$
6"

|X
 !a am    h·(· a m

· ·
·

·) · · 
   ·

$  -   +  $  ,


 & !# à8% à%."

·, · · 
  · ·
$     +  $  ,
 à8% à%. B 66

·+
· · 
  ·

$  %   +  $  ,


 $  -  $    &
à8% à%. B 6º

|X^
1
 à8%           7      "

C          "


 &   à8%   
   &! "

 &  
     
 à8%  4

        )
  ::1.º  
 +   *"

|Xº
·· a 
4

1
    $  &    

|" 8  $ "


" ,     "

,         $ 4  


 $    
$ 

      "    $   $#  
.9.
     + 
 $    "  & à8%    .9.
      
   $   
 +  "
,  $          $ 
 "
    
 $  
    
  
   
  

 
 $"   3$ 
   
    $ 

  
  4     
" ..8  à8C    
 "
..8  à8C    
$  
   
   
  
   +$ 
 $ " |X 
 à8%B..8     .9.  4    
   
 
   
 &     & 
      "

 à8%Bà8C  4    


  4-.  
     " 

  $    $ "

..8  à8C        $  0    4  


 0 
 $
"

//STEP2 EXEC PGM=IEBGENER,COND=EVEN


//STEP3 EXEC PGM=IEBGENER,COND=ONLY

..8  à8C     $ 


  à8% à%. "

|X
//STEP4 EXEC PGM=IEBGENER,COND=((4,LT,STEP1),EVEN)

 
 +  4    1.º     .

..8  à8C   $   


     +   

" à&    
   
 
3   à-  .9. 
à8%       & +$ 
  

|XX
·   ·· a 
4
 ! " # #
$$

   !! $  !


0 0     a  a1  
     a ! 1!!  ! 
   .
 !! $  !! 
    a      
 ·· a ! 1!! a a ! 
1!!

 !a1  {  !! 


 
4    !  {     
a a ! 
1!!

|X´
-a· ·
·· -

1
  & &  
 ':1.8:..:.8%'     

 

       4 $   4    "


·aa 
 &      4 
 ':1.8:..:.8%'       

 4  4     &    
  "  

 ) 4     *   4   
   

  

 + 
  4 
 & + 
 1.8  "

 !
·aa 
1  $  4  
     
  &    " 1    4
 
   "     
   &    "  
  
  
 &    $   +4        &4

   
      "

C    
 ':1.8:..:.8%'    &
  
   

à-  "    ( |XË
//[Name] IF (relational expression) THEN
//STEPTRUE EXEC
//[Name] ELSE
//STEPFALS EXEC
// ENDIF

· am!"

//MODAL2 JOB µ0.2AMIP¶,«..


//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
' 
  +   $4    
   ) &*  
   ""4  ""º
 
   ""|4  ""^4   +  $  
 # 
  
  | ""
) +B|*4     
     "

|´6
h a  a !  ÿ  &

· am!" 1
 +    
     "

//RCTEST IF (STEP1.RC GT 20|STEP2.RC = 60) THEN


//STEP3 EXEC PGM=U
//ENDTEST ENDIF
//NEXTSTEP EXEC

1
 & + 1.^ 

1
    1.|  $  
 64  
    1. 7  6"

 
     
    +    4 
 & &  1.^  
$ 
 8.911."

|´|
· am! )è 1
 +      ,-.8%    

//ABTEST IF (STEP4.LINK.ABEND=FALSE) THEN


//BADPROC ELSE
//CLEANUP EXEC PGM=ERRTN
//ENDTEST ENDIF
//NEXTSTEP EXEC

1
    +   
  ,-.8%      8@4   &

 .9.    1.º"  
    +   4  ,-.8% "
1
  1.8       8.911."  
    +  
 4  ,-.8% " 1
 ..      
 $    .??18"
1
 +     
 $  $  G 1.º"8@",-.8%B',. G

 &     ,-.8%  1.º"8@ G  $ 
 & &  
  
   &  )"*  
 3 ,-.8%"

|´
· am! ,è 1
 +           
  "

//CCTEST IF (ABENDCC = U0100) THEN


//GOAHEAD EXEC PGM=CONTINUE
//NOCC ELSE
//EXIT EXEC PGM=CLEANUP
//ENDIF

 &    


      6|664 
 .9.  
Aà,.,%   
  à818p."      
   4 

.9.   .91   $  .,8p"

|´^
' 
  +  
$4    

REPRO -
  ) &*  

INDATASET(COBOL.SOURCE.FILE1) _   ""4
OUTDATASET(COBOL.SOURCE.FILE2)  ""º 

 
 ""|4
REPRO -  ""^4 
INDATASET(COBOL.SOURCE.FILE3) -  +  $  

OUTDATSET(COBOL.SOURCE.FILE4)
# 
  
  |
"" ) +B|*4  
IF MAXCC GT 0   
  
THEN   "
SET MAXCC=16
ELSE
DELETE(COBOL.SOURCE.FILE1)
DELETE(COBOL.SOURCE.FILE3)

|´º
ha  a· ! 

1
   &        (
    
$    
8 )N*   
?   +  3&"

     )A14 14 "*      +  3& 
  " 1
         "

1
 $     F ),8%*  O )à?*   
 
 & 
    

-          + "

1
 N )8à1*     
 $  
    + "

?   +  3&   


 &    $  4 ,-.8% |´ 
4  ,-.8%   "
1
 1.8    ..          .9.  " 1
 .9.
      
 
 & +        
   
+ " , 1.8  ..   
      .9.      "

C    ':1.8:..:.8%'      |    $"

· am!" 1
 +    
     "
//RCTEST IF (STEP1.RC GT 20|STEP2.RC = 60) THEN
//STEP3 EXEC PGM=U
//ENDTEST ENDIF
//NEXTSTEP EXEC
1
 & + 1.^ (
1
    1.|  $  
 64 
1
    1. 7  6"

 
     
    +    4 
 & &  1.^ 
 $ 
 8.911."
|´
p =

33

|´X
33ÿ3  a  a a !&

A  %  

?  A  8 

-$ A%A -  .&

%$ ,   A  %  

 $ A  %  

?$ A  %  

|´´
 

p  
   
 A%A

&  $ A%A

|´Ë
3  a  a a3 !

?àA?,
à% ?.,% 8.
%,1, ,8A. %,1, %,1,
.1 ?1. .1

, A  %  A )A%A*   3!     


 

$ &   &  " ,     A%A   
$ "


&  A  %  A  )A%A*

C   &   $  &        "  


 4 
   ),-"%,1,  +  *    $4 &     $ 
  
    ) 
 ,-"%,1,*"

|Ë6
 |( C      $     

       +$   "
,1,àA .??à?| 8,. ,?.,%C 8 1. ,1,àA"

 ( C 3 


     

    "
 .??à?P %p,1. 8,. à8 1à"

 ^( C   $  3 


    
  "
 1,1..81 p1 -. ,8A.% 1à 1. 8. 8,.
p·-33"

'    
 $     & 4 A%A0  &      
   
 
     
      
  4   5-/,;4-
  $  $$  
    
   
     "

à +    A%A  $


   &    $" . 
 &     

$ 
     
  &" 1
     
    $ $
 
1?,8"àA4 
 
   $      1?,8"àA"A666|664
1?,8"àA"A666664 1?,8"àA"A666^664 "
|Ë|
330  #·! a 

A     )$ *


  &    ( ?   , 

DSN=ABD.DAILY.TRANS(+n)DSN=ABC.DAILY.TRANS.GxxxxVyy

(+n) Add a new generationGxxxxVyy:


(+0) Use current generation numberxxxxGeneration
number
(-n) Use an old generationyyVersion number

EXAMPLE
DSN=ABC.DAILY.TRANS(+1)DSN=ABC.DAILY.TRANS.G0053V00

# a a  am"


1
        
       &    
   
 
)1à*"
1
 '  (
DSN = NAME.GDG.G0052V00
VERSION NUMBER
|Ë
GENERATION NUMBER
a a a  am"

1
      
     A%A      $"   
$       
   $   
   $"

1
   (
DSN=NAME.GDG(+n) or DSN = NAME.GDG(-n)


 /0  
   $     
 A%A"

- ma 

(+n)    $  & $ /0  


  $   
   $
DSN=NAME.GDG(+1)
(0) p 
  $   
   $ DSN=NAME.GDG(0)

(-n) p 
 $  
  /0  
 
  $ 
|Ë^
DSN=NAME.GDG(-1)
· am!
   $ .
ABC.TRANS.DAILY.G0053V00
ABC.TRANS.DAILY.G0052V00
ABC.TRANS.DAILY.G0051V00


    $  
 4 
 $ A%A0      

(
a a   a a  
DSN=ABC.TRANS.DAILY(-1),DISP=OLD ABC.TRANS.DAILY.G0052V00

1
  $   
   $  A66 ^66"   ^ G | B  4 A66 66  

$  7" 1
   
  $ 
  &0 "

|˺
1
  $   
   $  A66 ^66" 1
      
  
   "

DSN=ABC.TRANS.DAILY(+1),DISP=(NEW,CATLG)
ABC.TRANS.DAILY.G0054V00

1
  $   
   $  A66 ^66"   ^ Q | B  º4 A66 º66 

 $  7" 1
   
  $    
  &"

|Ë 
330  #·! a  ÿ  &

1
 $      
A666|  
  $    
& 
     
       "
- · am!"

#· #· #%
p· #·

NAME.GDG(+0) NAME.GDG.G0003V00  $ 


NAME.GDG(-1) NAME.GDG.G0002V00  $  !|
NAME.GDG(-2) NAME.GDG.G0001V00  $  !

-    


 66    " 1
       66 


 $ "  $     $       4       

    
   4     
   $ $ 4 


//INDD DD DSN=NAME.GDG.G0052V00,DISP=OLD
//OUTDD DD DSN=NAME.GDG.G0052V01,DISP=(,CATLG) |Ë
33 #·2 %#·##
3· 4
- $          &  4 A%A    $ &  
%- )
 %-*     
   $" )      %-0*"
1
     %,   4 

       

   $ & 
  %-"
//JOBNAME JOB, ,««
//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//DSCB DD DSN=TEST.MODELDSCB.GDG1,SPACE=(TRK,0),
DCB=(RECFM=FB,LRECL=80,BLKSIZE=800),
UNIT=SYSDA,DISP=(,KEEP)
//SYSIN DD *
DEFINE GENERATIONDATAGROUP -
(NAME (TEST.GDG) -
NOSCRATCH -
NOEMPTY -
LIMIT (3)) |ËX
1
        

    $ A%A 
  $ &" 1
& (

1  +    $    


 A%A &
.1C
   +4   $  $ "
8à.1C
   +4   $  & &
?,1% &   $ $ "
8à?,1 %   &   $ $ "

1
  %- )::%-  
 +   *  
 
   %- 
.9%1         $ " 1
  $  &
$ $ "

1
  %-     
5  4        $"

1
  %-     
    
 
    $ & 
  $"
|Ë´
33 #·2 ##
3· 4

1
 $ +   
   A%A   $ &"

TEST.GDGBASE CATALOG ENTRY

A 
8 
Q6 A666X

!| A666

! A666 

!^ A666º

!º A666^

!  A666

! A666|

?.,1. à1à8 8 ,1,àA .81?C

EXAMPLES:
//DD1 DD DSN=TEST.GDG(+0),DISP=OLD   ) * &
//DD2 DD DSN=TEST.GDG(-6),DISP=OLD    &

8 
 
   $ &    3 
  3"
|ËË
,  $  $  4 
      +$ $  
$
33·(#
·0 -3· ·#

1
 $ +   
 

 
 
  $   A%A
$  "

//EXAMPLEJOB 378,SMITH,CLASS=T
//STEP1EXECPGM=USERPGM1
//FIRSTDDDSN=TEST.GDG.(+1),DISP=(,CATLG),
//INPUTDDDSN=INITIAL.DATA,DISP=OLD

1.1"A%A

Q6 A666| 1.1"A%A"A666|66

, 
  $   
 $    $   1.1"A%A   (

8 
 
 %B)4,1A*  7 
  $  $ "

?  $  )Q6*  $  A666|66"

66
1
 A%A -         $ & $   
   
33·(#
·2 · 3· ·#

1
 $ +   
 

 
 
  $   A%A $
 "
//EXAMPLEJOB378,SMITH,CLASS=G
//STEPXEXECPGM=MAINLINE
//GDGINDDDSN=TEST.GDG.(+0),DISP= OLD
//GDGOUTDDDSN=TEST.GDG(+1),DISP=(NEW, CATLG),
//

1.1"A%A

Q6 A666
!| A666| 1.1"A%A"A66666
1.1"A%A"A666|66

, 
  $   
 $    $   1.1"A%A   (
1
  $  )6*     " C   7   
  $ 


 # )Q6*4 # 
 
  $ )6*      & "
,  $  )Q|*   "
8 
 
   $ &    3 
!  3" A  A666|66  6|
 
 )!|* $ "
33·(#
·2 a3· ·#

1
 $ +   
 

 
 
 
 $   A%A $
 "
//EXAMPLEJOB378,SMITH, CLASS=G
//STEPXEXECPGM=MAINLINE
//GDGINDDDSN=TEST.GDG(+0),DISP= OLD
//GDGOUTDDDSN=TEST.GDG(+1),DISP=(NEW, CATLG),
//

1.1"A%A

Q6 A666^ 1.1"A%A"A666^66
!| A666 1.1"A%A"A66666
! A666| 1.1"A%A"A666|66

, 
 
 $   
 $    $   1.1"A%A   (
{ 1
  $  )6*     "
{ ,  $  )Q|*   "
{ 8 
 
   $ &    3 
  3"
6
33·(#
·0
·(···

à A%A  
 
    $     14

  $  J K 
   $   $  $
 "
1
  $   &   &  3    
4  $ 
1.1"A%A

   & 
 
 &  
 A%A "

Q6 A666º
!| A666^
! A666
A666| ?à.% à''

//EXAMPLEJOB 378,SMITH, CLASS=G


//STEPXEXECPGM=MAINLINE
//GDGINDDDSN=TEST.GDG(+0),DISP= OLD
//GDGOUTDDDSN=TEST.GDG(+1),DISP=(NEW, CATLG),
//

6^
 
 
$   
 $    $   1.1"A%A   (

1
  $  )6*     "
,  $  )Q|*   
1
  $ 4 TEST.GDG.G0001V004     
 
   $ 4  
 1     ^"
 8à?,1    4 
 $    3 4 
$
 
 $    $

 h  
 
 $      $4 
 $      
   $"
 
 $   88!   $4 
 $  

   $"
1
  + "  $  
      $        "

6º
33 #p
· %

//STEP1 EXEC PGM=ONE


//INBIG DD DSN=A.AIR,DISP=OLD
//OUT1 DD DSN=A.AIR(+1),DISP=(,CATLG,DELETE) ««.

--------------

//STEP2 EXEC PGM=TWO


//IN2 DD DSN=PROD.DATA,DISP=OLD
//OUT2 DD DSN=A.AIR(+2),DISP=(,CATLG,DELETE) «

----------

//STEP3 EXEC PGM=THREE


//IN3 DD DSN=A.AIR(+1),DISP=OLD
   ##ÿ)&$
 6 
·

, A%A, 7 )%8B,",?*  -0 $&        ,
$  &  
   $"
1
 )Q|* $   %% /àp1|0    $ "

·,

8 
 
 )Q|* $    à%" . 
$

 $      $ 
1.|4  
   $ 
 4 &    
   $    
 

   " 1
 &  
  &"

,   $      


  4  
   $   " ,
  |  
4  &     "

 

?  A%A            4 


 
     

  
$
 $  "

p %Bà% 
 $ A%A   
   ) 
   &* 
$ 
   A%A  
   "
6
 a  a3  a  a a ÿ  0&


  $  !!  $ $    4  &  

 

%8,.
%
p81

à  &4  


  

àp.
,.
,-.
%-

6X
 
 %8,.  4  
    
 A%A  &  4 Q| 
Q  4  
"

 
  
     $   A%A  
  4  Q|  
" . 

  
  &      
   A%A4   
   & "


 $  
      7   4  
   $ 
        
 %8,.  " C     
    

     

    "

, 
   
  4 
 &    
   $     
$   
 $   
 "

6´
  a3  a  a a

p 
 %..1.    
 %, &   A%A  

  $4 
(

//MODAL2 JOB µ0.2AMIP¶


//STEP1 EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE ABC.DATA.MONTHLY FORCE
/*
//

 
 +   
 A%A   ABC.DATA.MONTHLY  " 1
 'à?.
 
& & $      A%A"

6Ë
UNIT 9



|6
ÿ  aa am . m&

 



,  $  

8    

 

 &$ 

||
 

p     

p  
 ,  $  

p  à$ ,  ) 8  ,?*

p   

p  $   - 3 




|
Wh.pÿ  aa am . m&

 $   $  & )*         4 



  
  
   $     3    
   "

 4  & 


     &        4 
 

#     
   4  
   $ &"  
& 0   
&4 
        3  4   3      $ 
 %,%
 
   "

|^
## #3·-
 ma a a a   ha  a aa a(
p     3$   
       4
  
 & "
  
  &    $     3 "

   $         


&     $
%  
 +  4        #"

,         
   %,  
  "
,            + & 
 
  

$
  G "

4 
 &       
        
    
 
   "   &  4 
     
    4  &    !
      ),* 4    
    &   

%%  "
|º
#  a 
##··
; ?.' )  *
; ?. ) $
*
; ,. )  $  $
4  &4  &4  & 7 &*
;àp. )!*
1
      & "
?.à?A ) $ # * 
@.C.8 )3& $
*
@.Cà'' )3& 
,A?. ) 7    7 &*
?.1% ) * 
.9%1 )+    *
%81C. )   & 4 %  %.
1
        4  

   ,"
1
  $    &     
         

    "
1           
  4  
    $
| 
  $ ' & )'*"
   


4      
     
 $ 
 (

a aa !   


         
    
   "

a am a !   


         
 $   3
 
   " ,   $     &  $     
 
  $
  $"

  aa !   


         
  $   & 
   "
,    

  $   $     J!  $   R"
1
  $    &     
      ),*
 
    $ 
      "

|
' +  4 
 &    
 %%8,.4 %8,.4  %   
    (
//SMSDS0 DD DSNAME=MYDS0.PGM,DISP=(NEW,KEEP)
  
    
(
//SMSDSR DD DSNAME=MYDS0.PGM,DISP=MOD

 
 +  4   ! ,  )  &   
   
      & à-4 .9.4  %%  *       4
  $  4   $       
   "

C  & 


  4  4     
   "
1
   & 
 ,     
 
    
  $ 
   

|X
! .    

  &  4 
   & 
   ! ,  
  &   "

4 
 $    4 &       4   $  4
  $   & $     
 $ %%  (

%,1,   !   
    

A1, !   
   $  

1à?, !   
  $  

1
  $  
  
    
   &    &"
C    
         
 
     & $ '
|´
p  7·  

 ++! 22222222222222222222222222222222222222222222222222222

 22222222    


 !   ! 

3 2222222 ! !  !1 7

 222222222!   
 !  

|Ë