IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Split a file with only selected rows


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Thu Mar 30, 2006 11:30 pm
Reply with quote

Hi,

I have a dataset whose record length is 5000 and this keeps changing everytime we get the file. i would like to create another file from this big single row file that has only 80 record lenth and more rows instead of one big row. How can i do this.

and also is there a way that i can specify when ever u see a particular character like "table" write it in the next line. I hope iam clear


Thanks,
ganapath
Back to top
View user's profile Send private message
amitrath

New User


Joined: 30 Apr 2004
Posts: 28
Location: Carmel, USA.

PostPosted: Fri Mar 31, 2006 2:45 am
Reply with quote

ISPF EDITOR's TEXT FLOW line command provides exactly what you want.

TF?Text Flow
The TF (text flow) line command restructures paragraphs. This is sometimes
necessary after deletions, insertions, or splitting.
Syntax
TF[n]
n The column number to which the text should be flowed. The default is the
panel width when default boundaries are in effect. If you are using
nondefault bounds, the right boundary is used. This is different from the
TFLOW macro command, which always defaults to the right boundary.
If a number greater than the right boundary is specified, the right
boundary is used.
Description
To flow text:
1. Type TF in the line command area of the line at which you want the text to
begin flowing. If you want to specify the rightmost column position for the
restructured text, type a number greater than 1 immediately after the TF
command.
2. Press Enter. The text is flowed from the beginning of that line to the end of the
paragraph.
Back to top
View user's profile Send private message
GANAPATH

New User


Joined: 06 Mar 2006
Posts: 35

PostPosted: Wed Apr 05, 2006 1:21 am
Reply with quote

Hi,

This is very useful, i fixed it just like that,Thanks a lot, i have one more question, can we automate this somehow,
like i keep this in a jcl as a step and that will do the TF command instead of me opening the file and typing TF.Is this possible?


Aprreciate it.
Thanks,
Ganapath
Back to top
View user's profile Send private message
amitrath

New User


Joined: 30 Apr 2004
Posts: 28
Location: Carmel, USA.

PostPosted: Wed Apr 05, 2006 1:47 am
Reply with quote

Not sure about JCL. You cannot access ISPF editor line commands so easily through JCL.

But you can surely automate this through REXX.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed Apr 05, 2006 2:31 am
Reply with quote

I think a SORT would work well for you:
Code:

//STEPXXXX EXEC PGM=ICEMAN                     
//SORTIN   DD   DSN=<5000-byte dataset>
//SORTOUT  DD   DSN=<80-byte dataset>,
//         DISP=(,CATLG,DELETE),UNIT=SYSDA,     
//         SPACE=(CYL,(1,1),RLSE)               
//SYSOUT   DD   SYSOUT=*                       
//SYSIN    DD   *                               
  OPTION COPY                                     
  OUTFIL OUTREC=(1,80,/,                         
                 81,80,/,                         
                 161,80,/,                       
                 241,80,/,                       
                 321,80,/,                       
                 401,80,/,                       
                 481,80,/,                       
                 561,80,/,                       
                 641,80,/,                       
                 721,80,/,                       
                 801,80,/,                       
                 881,80,/,                       
                 961,80,/,                       
                 1041,80,/,                       
                 1121,80,/,                       
                 1201,80,/,                       
                 1281,80,/,                       
                 1361,80,/,                       
                 1441,80,/,                       
                 1521,80,/,                       
                 1601,80,/,                       
                 1681,80,/,                       
                 1761,80,/,                       
                 1841,80,/,                       
                 1921,80,/,                       
                 2001,80,/,                       
                 2081,80,/,                       
                 2161,80,/,                       
                 2241,80,/,                       
                 2321,80,/,                       
                 2401,80,/,                       
                 2481,80,/,                       
                 2561,80,/,                       
                 2641,80,/,                       
                 2721,80,/,                       
                 2801,80,/,                       
                 2881,80,/,                       
                 2961,80,/,                       
                 3041,80,/,                       
                 3121,80,/,                       
                 3201,80,/,                       
                 3281,80,/,                       
                 3361,80,/,                       
                 3441,80,/,               
                 3521,80,/,               
                 3601,80,/,               
                 3681,80,/,               
                 3761,80,/,               
                 3841,80,/,               
                 3921,80,/,               
                 4001,80,/,               
                 4081,80,/,               
                 4161,80,/,               
                 4241,80,/,               
                 4321,80,/,               
                 4401,80,/,               
                 4481,80,/,               
                 4561,80,/,               
                 4641,80,/,               
                 4721,80,/,               
                 4801,80,/,               
                 4881,80,/,               
                 4961,39)                 
/*                                         
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 0
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top