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

Split Input file into 2 output files using selection criteri


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

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 8:54 pm
Reply with quote

I want to split my input file below into 2 output files as shown below. I am trying to use the SORT card described below, but its not working. My Input file is a VB.
Input:

Code:
-+----6----+----7----+---
*************************
ABC                 0060
XYZ                 0020
PQR                 0030
TTTT                     
SSSS                     
UUUU                     
VVVV                0060
WWWW                0020
ZZZZ                0030


Output:

File1:

Code:
XYZ                 0020
PQR                 0030
TTTT                   
SSSS                   
UUUU                   
WWWW                0020
ZZZZ                0030


File2:

Code:
ABC                 0060
XYZ                 0020
TTTT                   
SSSS                   
UUUU                   
VVVV                0060
WWWW                0020



Code I am using:

Code:

//SYSIN DD                                     
 OPTION COPY                                 
 OUTFIL FILES=1,OMIT=(74,04,CH,EQ,C'0030')   
 OUTFIL FILES=2,OMIT=(74,04,CH,EQ,C'0060')   
/*


I am getting following error:

Code:
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN                                   
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 23552, ABOVE 16M = 4203520     
ICE210I 0 SORTOF1  : EXCP USED, LRECL = 4004, BLKSIZE = 27998, TYPE = VB   (SDB)
ICE210I 0 SORTOF2  : EXCP USED, LRECL = 4004, BLKSIZE = 27998, TYPE = VB   (SDB)
ICE218A 3 63 BYTE VARIABLE RECORD IS SHORTER THAN 81 BYTE MINIMUM FOR SORTOF1  FIELDS
ICE751I 1 EF-K49534 CB-K90013 F0-K30362 E8-K51706                               
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Tue Jul 26, 2011 9:02 pm
Reply with quote

ICE218A 3 63 BYTE VARIABLE RECORD IS SHORTER THAN 81 BYTE MINIMUM FOR SORTOF1 FIELDS

Does this ring anything?
Back to top
View user's profile Send private message
avashisht

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 10:14 pm
Reply with quote

I found some records in the input file which have a length of 59 bytes. I want those records in both the output files as my control card specifies.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 26, 2011 10:19 pm
Reply with quote

Well, your control card does not specify this, as there is no data on the short records which matches what you are testing.

Find out how to avoid looking at that part of the record when they are short.

Also, if you've "found" these records, are there other things on the file you are not aware of?
Back to top
View user's profile Send private message
avashisht

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 10:23 pm
Reply with quote

The file is pretty consistent in this regard. These records ending at 59 bytes are the only ones which are falling short of the Criteria in Control Card. Rest all the records have length more than 80 bytes atleast.
Back to top
View user's profile Send private message
avashisht

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 10:42 pm
Reply with quote

Do I have to conver the VB file to FB before attempting to split and then convert it back to VB? Or, is there a way I can accomplish this in one step.
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 26, 2011 10:57 pm
Reply with quote

OK, so remember when "avoiding" them for the other test, they are actually 63 bytes long, 59 of data of 4 of RDW.
Back to top
View user's profile Send private message
avashisht

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 10:59 pm
Reply with quote

How do I avoid them from the test? Even if I avoid them from the test, will I still be able to get those records in both the output files?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jul 26, 2011 11:03 pm
Reply with quote

You just need to use DFSORT's VLSCMP option, e.g.

Code:

    OPTION COPY,VLSCMP
    ...
Back to top
View user's profile Send private message
avashisht

New User


Joined: 16 Sep 2005
Posts: 11

PostPosted: Tue Jul 26, 2011 11:06 pm
Reply with quote

Great.. That did the trick.. Thanks Frank. Bill, thanks to you too!
Back to top
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Tue Jul 26, 2011 11:38 pm
Reply with quote

No problem, thanks for the thanks.
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 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
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
Search our Forums:

Back to Top