|
View previous topic :: View next topic
|
| Author |
Message |
bubbu75
New User
Joined: 14 Nov 2017 Posts: 2 Location: India
|
|
|
|
Hi
I have a VB file with record length 2250(2246+4).This file consists of groups of specific pattern., I need to split this file into 8 splits every time since the file can have a maximum of 3,70,000 groups.each split should have 50,000 groups only. If it's less than maximum limit say only 70,000 groups in input file then 1st split should have 50,000, second 20,000 and rest of the files should get created as an empty file. These splits has to be gdg's. Please let me know how to achieve this using dfsort.
Also I need a trailer in each file at end with count of groups in that file. For example if input has 70,000 groups ( not no of lines) the 1st file trailer should have 50,000 as count. Second file should have 20,000as count in trailer.
My group pattern
00000000000
xxx
Xxx
Xxx
99999999999
00000000000
Xxx
Xxx
99999999999
00000000000
Xx
99999999999
Here my file always has 11 digit zeros 00000000000 as start of the group and 11 digit 9's as end of the group.this is same for all the groups but the content in between start and end of the groups will change. Thanks in advance! |
|
| Back to top |
|
 |
Rohit Umarjikar
Global Moderator

Joined: 21 Sep 2010 Posts: 3112 Location: NYC,USA
|
|
|
|
| All right, What have you tried so far, RTFM atleast? |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
Did you try to DO SOMETHING AT ALL by yourself? What are the results of your attempts?
This forum is supposed to help others in fixing encountered issues, and to clarify sophisticated terms.
This forum is not supposed to do others' jobs in full. At least - not free of charge. |
|
| Back to top |
|
 |
bubbu75
New User
Joined: 14 Nov 2017 Posts: 2 Location: India
|
|
|
|
Hi,
sorry I missed to include the code after writing a long query.
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,CH,EQ,C'00000000000'),
END=(1,11,CH,EQ,C'99999999999'),PUSH=(2251:ID=8))
OUTFIL NAMES=SORTOF01,INCLUDE(2251,8,ZD,LT,51000),
BUILD=(5:5,2246)
OUTFIL NAMES=SORTOF02,
INCLUDE(2251,8,ZD,GT,50000,OR,2251,8,ZD,LT,100001),
OUTFIL NAMES=SORTOF03,
INCLUDE(2251,8,ZD,GT,100000,OR,2251,8,ZD,LT,151000),
.
.
.
.
OUTFIL NAMES=SORTOF08,SAVE,BUILD=(5:5,2246)
MY input file is vb,recl=2250(2246+4), all my 8 o/p files are vb,recl=2250(2246+4). I am getting error with the above code. it says "POTENTIALLY IINEFFICIENT USE OF INREC", "SORT01 OUTREC RDW NOT INCLUDED".. I tried the same code with fb it worked.i don't know how to give the positions in vb..I know its bit different because of that 4 bytes |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
| bubbu75 wrote: |
Hi,
sorry I missed to include the code after writing a long query.
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,BEGIN=(1,11,CH,EQ,C'00000000000'),
END=(1,11,CH,EQ,C'99999999999'),PUSH=(2251:ID=8))
OUTFIL NAMES=SORTOF01,INCLUDE(2251,8,ZD,LT,51000),
BUILD=(5:5,2246)
OUTFIL NAMES=SORTOF02,
INCLUDE(2251,8,ZD,GT,50000,OR,2251,8,ZD,LT,100001),
OUTFIL NAMES=SORTOF03,
INCLUDE(2251,8,ZD,GT,100000,OR,2251,8,ZD,LT,151000),
.
.
.
.
OUTFIL NAMES=SORTOF08,SAVE,BUILD=(5:5,2246)
MY input file is vb,recl=2250(2246+4), all my 8 o/p files are vb,recl=2250(2246+4). I am getting error with the above code. it says "POTENTIALLY IINEFFICIENT USE OF INREC", "SORT01 OUTREC RDW NOT INCLUDED".. I tried the same code with fb it worked.i don't know how to give the positions in vb..I know its bit different because of that 4 bytes |
1. You MUST use 'Code' tags, to make your post viewable to readers (unless you hate all of other readers of your posts)
2. Definitely your syntax
| Code: |
OUTFIL NAMES=SORTOF02,
INCLUDE(2251,8,ZD,GT,50000,OR,2251,8,ZD,LT,100001),
OUTFIL NAMES=SORTOF03,
INCLUDE(2251,8,ZD,GT,100000,OR,2251,8,ZD,LT,151000),
.
. |
is wrong. Nothing to talk about this
3. Your output record format definition
is wrong for RECFM=VB. This is exactly what error message "SORT01 OUTREC RDW NOT INCLUDED" is saying, but you prefer to ignore it, do you?
Please, fix your problems, step by step. Then we might continue (unless you are able to find yourself the obvious mistakes caused by your laziness) |
|
| Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2290 Location: USA
|
|
|
|
The message "SORT01 OUTREC RDW NOT INCLUDED" definitely states that you need to include RDW in your record definition
It must be done as
| Code: |
BUILD=(1,4, this is RDW for RECFM=VB
5:5,2246) this is record body, after RDW |
Those experts who don't know this syntax are advised to visit the Beginners Forum |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|