Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Split a file with only selected rows

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Split a file with only selected rows
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    Post subject: Re: Split a file
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    Post subject: Re: Split a file with only selected rows
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    Post subject: Re: Split a file with only selected rows
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

Moderator Team Head


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

PostPosted: Wed Apr 05, 2006 2:31 am    Post subject: Re: Split a file with only selected rows
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us