Tuesday 12 March 2013

EDIT line commands - COPY


EDIT line commands- COPY


This is used to copy a dataset to the position marked by a A(after) or B(Before) line command or label.

Syntax:

COPY [member name] [AFTER]  label]
                   [BEFORE] 
COPY                will bring up a menu to enter dataset name

To use copy first we type A (after) or B(before) on the line where we want to copy another member and then type the command COPY membername on the command line and hit enter.

XX00       M0001.EDW.TEST.JCL(TESTJCL1) - 03.14                  COPY pending
Command ===> copy sort001                                     Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 //TESTJCL1 JOB (EWDS),'TEST JCL',NOTIFY=&SYSUID                        
b00002 //STEP0001 EXEC PGM=TESTPGM1                                           
000003 //STEPLIB DD DSN=CMN.TEST.STG.#001621.LOD,DISP=SHR                      

In the above example we have placed a B at line two and typed 'copy sort001' on the command line. Hitting enter will cause the member sort001 to be copied before line 2.

In the below example we have created a label with name .m on the line 3. Then we type the command 'COPY SORT001 AFTER .M' on the command line and hit enter. This will cause the member to be copied after line labeled with .M

XX00       M0001.EDW.TEST.JCL(TESTJCL1) - 03.14           Columns 00001 00072
Command ===> copy sort001 after .M                            Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 //TESTJCL1 JOB (EWDS),'TEST JCL',NOTIFY=&SYSUID                        
000002 //teststep EXEC PGM=TESTPGM1                                           
.M     //STEPLIB DD DSN=CMN.TEST.STGO.#001621.LOD,DISP=SHR                    

We can just use COPY command on the command line to get a selection panel where in we can browse to the datasets we want to copy.
In the below example we have typed A on line 4 indicates that we have to copy data after line 4. Then we type COPY on the command line to get a PDS selection panel as below:

  Menu  RefList  Utilities  Help                                               
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
XX00                           Edit/View - Copy                               
Command ===>                                                                  
                                                                   More:     +
"Current" Data Set: M0001.EDW.TEST.JCL(TESTJCL1)                             
                                                                              
From ISPF Library:                                                             
   Project . . .                                                              
   Group . . . .          . . .          . . .          . . .                 
   Type  . . . .                                                               
   Member  . . .                (Blank or pattern for member selection list)  
                                                                              
From Other Partitioned or Sequential Data Set, or z/OS UNIX file:             
   Name . . . . . 'M0001.EDW.TEST.JCL'                                      +
   Volume Serial . .           (If not cataloged)                             
                                                                               
Data Set Password  . .          (If password protected)                       
                                                                              
Line Numbers (Blank for entire member, sequential data set or z/OS UNIX file) 
   First line  . . . .                                                        
 F1=Help      F2=Split     F3=Exit      F7=Backward  F8=Forward   F9=Swap     
F10=Actions  F12=Cancel                                                       

Highlighted is where we provide the PDS name and hit enter. It will bring the list of all members in the pds as shown below

  Menu  Functions  Utilities  Help                                            
ssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssssss
XX00 Extended Copy to M0001.EDW.TEST.JCL(TESTJCL1)         Row 00001 of 00024
Command ===>                                                  Scroll ===> CSR 
   Name     Prompt          Size    Created           Changed            ID   
. SMATN603                    63   2003/02/12   2013/01/04 09:12:55    M0001 
S SMCCC803                    11   2006/06/06   2013/02/06 09:47:14    M0001 
. SMCTN807                    32   2005/07/14   2013/02/07 07:15:56    M0001 

Enter 's' against the member we want to copy and hit enter. This member will get copied to the original member.

No comments:

Post a Comment