Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Split file FILE-A into FILE-1 & FILE-2

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

New User


Joined: 11 Sep 2008
Posts: 29
Location: USA

PostPosted: Tue Feb 15, 2011 3:22 am    Post subject: Split file FILE-A into FILE-1 & FILE-2
Reply with quote

I have a FB FILE-A of 422 byte length, which needs to be split into 2 files.

File-1:
INCLUDE

IF POS-58 = '5' AND POS-121-122 NOT= 42 and POS-121-122 NOT= 45 AND DATE GREATER THAN 10/14/2010 (mm/dd/yyyy is the format in the FILE-A)

OR

IF POS-58 = 'S' AND DATE GREATER THAN 10/14/2010 (mm/dd/yyyy is the format in the FILE-A)

ELSE
write to FILE-2:


Could some one please help me.
Back to top
View user's profile Send private message

Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Feb 15, 2011 3:42 am    Post subject:
Reply with quote

Assuming your date in FILE-A is really mmddyyyy in positions 32-39 as stated in your other post, here's a DFSORT job that will do what you asked for. If your date is really something else or somewhere else, adjust accordingly, or give me the details and I'll show you how to change the job.

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/422)
//OUT1 DD DSN=...  output file1 (FB/422)
//OUT2 DD DSN=...  output file2 (FB/422)
//SYSIN DD *
 INREC OVERLAY=(423:36,4,32,4)                             
  OPTION COPY                                               
  OUTFIL FNAMES=OUT1,INCLUDE=((58,1,CH,EQ,C'5',AND,         
    121,2,CH,NE,C'42',AND,121,2,CH,NE,C'45',AND,           
    423,8,CH,GT,C'20101014'),OR,                           
   (58,1,CH,EQ,C'S',AND,                                   
    423,8,CH,GT,C'20101014')),BUILD=(1,422)                 
  OUTFIL FNAMES=OUT2,SAVE                                   
/*
Back to top
View user's profile Send private message
subbu1522

New User


Joined: 11 Sep 2008
Posts: 29
Location: USA

PostPosted: Tue Feb 15, 2011 4:12 am    Post subject: Reply to: Split file FILE-A into FILE-1 & FILE-2
Reply with quote

Hi Frank, thanks for your quick help. Yes, my date format is really mmddyyyy fermat. Looks like the code that you gave is getting me the good results.

Thanks.
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 SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us