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 files upto certain limit based on groups using dfsort

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
bubbu75

New User


Joined: 14 Nov 2017
Posts: 2
Location: India

PostPosted: Tue Nov 14, 2017 11:11 pm    Post subject: Split files upto certain limit based on groups using dfsort
Reply with quote

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
View user's profile Send private message

Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Tue Nov 14, 2017 11:17 pm    Post subject:
Reply with quote

All right, What have you tried so far, RTFM atleast?
Back to top
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Tue Nov 14, 2017 11:19 pm    Post subject:
Reply with quote

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
View user's profile Send private message
bubbu75

New User


Joined: 14 Nov 2017
Posts: 2
Location: India

PostPosted: Wed Nov 15, 2017 6:38 pm    Post subject: Reply to: Split files upto certain limit based on groups using dfsort
Reply with quote

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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Wed Nov 15, 2017 10:55 pm    Post subject: Re: Reply to: Split files upto certain limit based on groups using dfsort
Reply with quote

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
Code:
BUILD=(5:5,2246)
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
View user's profile Send private message
sergeyken

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Wed Nov 15, 2017 11:11 pm    Post subject:
Reply with quote

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
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 Compare and COPY using DFSORT pshongal DFSORT/ICETOOL 3 Fri Nov 17, 2017 9:49 am
No new posts Copy selected columns from 2 input fi... Poha Eater DFSORT/ICETOOL 3 Thu Nov 02, 2017 3:43 pm
No new posts Finding difference between two PS fil... Vignesh Sid SYNCSORT 5 Mon Oct 30, 2017 1:13 pm
No new posts NDM 300 files from mainframe to linux shreya19 All Other Mainframe Topics 2 Thu Oct 26, 2017 11:40 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm

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