Sunday 10 March 2013

EDIT line commands - Shifting data right and left


< commands are data shift commands
( commands are column shift commands

<
(
Shift this line left two positions
<n
(n
Shift this line left n positions
<<
((
Shift a block of lines left two positions
<<n
((n
Shift a block of lines left n positions
 >
)
Shift this line right two positions
>n
)n
Shift this line right n positions
>>
))
Shift a block of lines right two positions
>>n
))n
Shift a block of lines right n positions

Following is how the >> command is written:

 XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
 Command ===>                                                  Scroll ===> CSR 
 ****** ***************************** Top of Data ******************************
 >>8001 //DWJ030C0       EXEC PGM=TESTPGM1                                      
 000002 //MINPUT  DD DSN=M0001.TESTFILE.MASTER2,DISP=(OLD,CATLG,CATLG),       
 000003 //           DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                          
 >>8004 //SYSIN   DD *                                                         
                                                  

Hitting Enter will give us below output

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 //DWJ030C0               EXEC PGM=TESTPGM1                             
000002 //MINPUT          DD DSN=M0001.TESTFILE.MASTER2,DISP=(OLD,CATLG,CATLG),
000003 //                   DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                  
000004 //SYSIN           DD *                                                 

See that only the data portion is shifted 8 positions.
The stepname and DDNAME stay in place.

Following is how the )) command is written

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
))5001 //DWJ030C0       EXEC PGM=TESTPGM1                                     
000002 //MINPUT  DD DSN=M0001.TESTFILE.MASTER2,DISP=(OLD,CATLG,CATLG),       
000003 //           DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                          
))5004 //SYSIN   DD *                                                         

Hitting enter will give us following output

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001      //DWJ030C0       EXEC PGM=TESTPGM1                                
000002      //MINPUT  DD DSN=M0001.TESTFILE.MASTER2,DISP=(OLD,CATLG,CATLG),  
000003      //           DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                     
000004      //SYSIN   DD *                                                    

Note that the data along with step name and DDNAME got shifted 5 places.

No comments:

Post a Comment