Showing posts with label Editing commands. Show all posts
Showing posts with label Editing commands. Show all posts

Sunday, 10 March 2013

EDIT Line commands - Flow fragments of text into a paragraph



TF
Flow text to the end of paragraph which is either a blank line or an indentation.
TFn
n is the column number. This will flow the text using the column number as the right margin

Type command TF on the line as shown below

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.09           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
000005 //           DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                          
000006 //SYSIN   DD *                                                         
tf0007 12                                                                      
000008 SUKUL                                                                  
000009 MAHADIK                                                                
000010 35000                                                                   
000011 Y                                                                      
000012 30                                                                     
000013 DUSHYANT                                                               
000014 JADAV                                                                  
000015 67000                                                                  
000016 Y                                                                      
000017 40                                                                      
000018 MAHENDRA                                                               
000019 GAREWAL                                                                
000020 20000                                                                   
000021 N                                                                      
000022 /*                                                                     
****** **************************** Bottom of Data ****************************

Type enter and we get following output

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
000005 //           DCB=(LRECL=80,RECFM=FB,BLKSIZE=)                          
000006 //SYSIN   DD *                                                         
000007 12 SUKUL MAHADIK 35000 Y 30 DUSHYANT JADAV 67000 Y 40 MAHENDRA GAREWAL 
000008 20000 N /*                                                              
****** **************************** Bottom of Data ****************************

If we use a column number 20 as the right margin we use the command TF20

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.09           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
000006 //SYSIN   DD *                                                         
tf2007 12                                                                      
000008 SUKUL                                                                  
000009 MAHADIK                                                                
000010 35000                                                                  
000011 Y                                                                      
000012 30                                                                     
000013 DUSHYANT                                                               
000014 JADAV                                                                   
000015 67000                                                                  
000016 Y                                                                      
000017 40                                                                      
000018 MAHENDRA                                                               
000019 GAREWAL                                                                
000020 20000                                                                   
000021 N                                                                      
000022 /*                                                                     
****** **************************** Bottom of Data ****************************

Hitting enter gives following output. Note that right margin is restricted to column position 20

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
000006 //SYSIN   DD *                                                         
000007 12 SUKUL MAHADIK                                                       
000008 35000 Y 30 DUSHYANT                                                    
000009 JADAV 67000 Y 40                                                       
000010 MAHENDRA GAREWAL                                                       
000011 20000 N /*                                                             
****** **************************** Bottom of Data ****************************


 

EDIT Line commands - Splitting text on multiple lines


TS is the command used for splitting lines.

Suppose we have text as below and wish to split the line number 2 starting at  the text 'TEST'.

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 THIS IS A TEST LINE                                                    
000002 THIS IS A TEST LINE 2                                                   
000003 THIS IS A TEST LINE 3                                                  

Type TS on the line 2 , place the cursor on the word TEST and hit enter.

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 THIS IS A TEST LINE                                                     
TS0002 THIS IS A TEST LINE 2                                                  
000003 THIS IS A TEST LINE 3                                                  

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 THIS IS A TEST LINE
000002 THIS IS A                                                               
000003 TEST LINE 2                                                            
000004 THIS IS A TEST LINE 3                                                  

To split the line and add 4 lines in between, we suffix the command TS with the number (number of lines)

TSn Split a text line at the cursor and insert n number of lines 

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 THIS IS A TEST LINE                                                    
000002 THIS IS A                                                              
000003 TEST LINE 2                                                             
TS4004 THIS IS A TEST LINE 3                                                  

After hitting enter following is what I get follows

XX00       M0001.D00.TEST.JCL(TESTJCL1) - 03.10           Columns 00001 00072
Command ===>                                                  Scroll ===> CSR 
****** ***************************** Top of Data ******************************
000001 THIS IS A TEST LINE                                                    
000002 THIS IS A                                                              
000003 TEST LINE 2                                                            
000004 THIS IS A T                                                            
''''''                                                                         
''''''                                                                        
''''''                                                                        
''''''                                                                         
000005 EST LINE 3                                                             

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.