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
 
Spliting one file in to 30 files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Jun 21, 2013 5:30 pm    Post subject: Spliting one file in to 30 files
Reply with quote

Hi All,

I have SYNCSORT installed at my Shop and I have a requirement like below

Need to split one sequential file in to 30 equal partition files based on a field defined as S9(13) comp-3

I am using below card but not getting desired results , INput file is having arround 16 millions record but all of them are of 7 digits in file
Code:
SORT FIELDS=COPY                                             
OUTFIL FILES=01,INCLUDE=(130,13,PD,LE,3333333333333)    *** 
OUTFIL FILES=02,INCLUDE=(130,13,PD,GT,333333333333,AND, *** 
                        130,13,PD,LE,666666666666)     ***   
OUTFIL FILES=03,INCLUDE=(130,13,PD,GT,666666666666,AND, *** 
                        130,13,PD,LE,999999999999)     ***   
OUTFIL FILES=04,INCLUDE=(130,13,PD,GT,999999999999,AND, *** 
                        130,13,PD,LE,1333333333332)     *** 
OUTFIL FILES=05,INCLUDE=(130,13,PD,GT,1333333333332,AND, ***
                        130,13,PD,LE,1666666666665)     *** 
OUTFIL FILES=06,INCLUDE=(130,13,PD,GT,1666666666665,AND, ***
                        130,13,PD,LE,1999999999998)     *** 
OUTFIL FILES=07,INCLUDE=(130,13,PD,GT,1999999999998,AND, ***
                        130,13,PD,LE,2333333333331)     *** 
OUTFIL FILES=08,INCLUDE=(130,13,PD,GT,2333333333331,AND, ***
                        130,13,PD,LE,2666666666664)     *** 
OUTFIL FILES=09,INCLUDE=(130,13,PD,GT,2666666666664,AND, ***
                        130,13,PD,LE,2999999999997)     *** 
OUTFIL FILES=10,INCLUDE=(130,13,PD,GT,2999999999997,AND, ***
                         130,13,PD,LE,3333333333330)    *** 
OUTFIL FILES=11,INCLUDE=(130,13,PD,GT,3333333333330,AND, ***
                         130,13,PD,LE,3666666666663)    *** 
OUTFIL FILES=12,INCLUDE=(130,13,PD,GT,3666666666663,AND, ***
                         130,13,PD,LE,3999999999996)    *** 
OUTFIL FILES=13,INCLUDE=(130,13,PD,GT,3999999999996,AND, ***
                         130,13,PD,LE,4333333333329)    *** 
OUTFIL FILES=14,INCLUDE=(130,13,PD,GT,4333333333329,AND, ***
                         130,13,PD,LE,4666666666662)    *** 
OUTFIL FILES=15,INCLUDE=(130,13,PD,GT,4666666666662,AND, ***
                         130,13,PD,LE,4999999999995)    *** 
OUTFIL FILES=16,INCLUDE=(130,13,PD,GT,4999999999995,AND, ***
                         130,13,PD,LE,5333333333328)    *** 
OUTFIL FILES=17,INCLUDE=(130,13,PD,GT,5333333333328,AND, ***
                         130,13,PD,LE,5666666666661)    ***
OUTFIL FILES=18,INCLUDE=(130,13,PD,GT,5666666666661,AND, ***
                         130,13,PD,LE,5999999999994)    ***
OUTFIL FILES=19,INCLUDE=(130,13,PD,GT,5999999999994,AND, ***
                         130,13,PD,LE,6333333333327)    ***
OUTFIL FILES=20,INCLUDE=(130,13,PD,GT,6333333333327,AND, ***
                         130,13,PD,LE,6666666666660)    ***
OUTFIL FILES=21,INCLUDE=(130,13,PD,GT,6666666666660,AND, ***
                         130,13,PD,LE,6999999999993)    ***
OUTFIL FILES=22,INCLUDE=(130,13,PD,GT,6999999999993,AND, ***
                         130,13,PD,LE,7333333333326)    ***
OUTFIL FILES=23,INCLUDE=(130,13,PD,GT,7333333333326,AND, ***
                         130,13,PD,LE,7666666666659)    ***
OUTFIL FILES=24,INCLUDE=(130,13,PD,GT,7666666666659,AND, ***
                         130,13,PD,LE,7999999999992)    ***
OUTFIL FILES=25,INCLUDE=(130,13,PD,GT,7999999999992,AND, ***
                         130,13,PD,LE,8333333333325)    *** 
OUTFIL FILES=26,INCLUDE=(130,13,PD,GT,8333333333325,AND, ***
                         130,13,PD,LE,8666666666658)    *** 
OUTFIL FILES=27,INCLUDE=(130,13,PD,GT,8666666666658,AND, ***
                         130,13,PD,LE,8999999999991)    *** 
OUTFIL FILES=28,INCLUDE=(130,13,PD,GT,8999999999991,AND, ***
                         130,13,PD,LE,9333333333324)    *** 
OUTFIL FILES=29,INCLUDE=(130,13,PD,GT,9333333333324,AND, ***
                         130,13,PD,LE,96666666666657)     ***
OUTFIL FILES=30,INCLUDE=(130,13,PD,GT,96666666666657,AND, ***
                          130,13,PD,LE,99999999999999)    ***


Can some one please assist me on this , when I run this card I get data only in five files, one file have 4038 records , 3 files have 1 record few more files have 4 or 2 records and others are empty
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8154
Location: East Dubuque, Illinois, USA

PostPosted: Fri Jun 21, 2013 5:54 pm    Post subject:
Reply with quote

You are telling the sort that you have a 25-digit packed decimal number starting in position 130; try changing 130,13 to 130,7 since packed decimal numbers store 2 digits per byte.
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Fri Jun 21, 2013 7:17 pm    Post subject:
Reply with quote

Quote:
Need to split one sequential file in to 30 equal partition files


May be if something like below is supported in SYNCSORT then dont need such a big card

Code:
OUTFIL FNAMES=(OUT1,OUT2),SPLIT
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10309
Location: italy

PostPosted: Fri Jun 21, 2013 7:42 pm    Post subject: Reply to: Spliting one file in to 30 files
Reply with quote

Pandora did You notice the logic flaw in the description of the requirement ???

Quote:
Need to split one sequential file in to 30 equal partition files based on a field defined as S9(13) comp-3


somebody must take a decision ...
split on an equal number of records or on a key icon_cool.gif
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1542
Location: Andromeda Galaxy

PostPosted: Fri Jun 21, 2013 7:53 pm    Post subject:
Reply with quote

Yes yes I wanted to ask that too but missed to ask TS

Hope heehs throws some insight
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2285
Location: @my desk

PostPosted: Fri Jun 21, 2013 8:29 pm    Post subject:
Reply with quote

Apart from the logical flaw, one more thing I just noticed here.
The TS says key is defined as S9(13) comp-3. But couple of places the number of digits are 14 icon_eek.gif and in FILES=01 the condition is not mutually exclusive, ending up same records in multiple files (ofcourse the PD length error is there as well).

Code:
OUTFIL FILES=01,INCLUDE=(130,13,PD,LE,3333333333333)     --> 13 digits 
OUTFIL FILES=02,INCLUDE=(130,13,PD,GT,333333333333,AND,  --> 12 digits
                        130,13,PD,LE,666666666666)       --> 12 digits 
OUTFIL FILES=03,INCLUDE=(130,13,PD,GT,666666666666,AND, 
                        130,13,PD,LE,999999999999)     
OUTFIL FILES=04,INCLUDE=(130,13,PD,GT,999999999999,AND, 
                        130,13,PD,LE,1333333333332)     
OUTFIL FILES=05,INCLUDE=(130,13,PD,GT,1333333333332,AND,
                        130,13,PD,LE,1666666666665)       

Code:
OUTFIL FILES=29,INCLUDE=(130,13,PD,GT,9333333333324,AND,  --> 13 digits
                         130,13,PD,LE,96666666666657)     --> 14 digits
OUTFIL FILES=30,INCLUDE=(130,13,PD,GT,96666666666657,AND, --> 14 digits
                          130,13,PD,LE,99999999999999)    --> 14 digits
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 -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Split 1 file into 10 output Files - S... Prasanth Kumar SYNCSORT 5 Sat Sep 16, 2017 12:02 am
No new posts BUILD OUTFIL based on condition other... balaji81_k DFSORT/ICETOOL 13 Fri Sep 08, 2017 11:06 pm
No new posts Skip file from delete pema_yozer All Other Mainframe Topics 3 Tue Aug 29, 2017 3:19 pm
No new posts Join records from 2 files with No Dup... Poha Eater DFSORT/ICETOOL 21 Sun Aug 27, 2017 10:35 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm

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