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
 

 

Splitting VB File with Goups

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

New User


Joined: 26 Nov 2013
Posts: 4
Location: USA

PostPosted: Sat Apr 05, 2014 2:46 am    Post subject: Splitting VB File with Goups
Reply with quote

Hi,
I have a VB file with Multiple header+detail records+trailer groups. Group should not be changed or sorted.
The file will contain say 51000 groups it need to be split this into two files one with 25000 groups and balance 26000 groups to second file. Two output file need to be in VB format

Please suggest me a sort
Back to top
View user's profile Send private message

Rohit Umarjikar

Senior Member


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

PostPosted: Sat Apr 05, 2014 3:52 am    Post subject:
Reply with quote

You might wants to see, and look for "Sort detail records between headers and trailers"

I believe you would want to sort the details between the headers trailers.

ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf

And provide sample input data and what is the output expected whith what logic.

Thanks,
Rohit
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Apr 05, 2014 3:55 am    Post subject:
Reply with quote

Answer all the questions.

1. How do you identify the Header? Is there an indicator? If so what is the position and format of the indicator?
2. How do you identify the detail record? Is there an indicator? If so what is the position and format of the indicator?
3. How do you identify the trailer record? Is there an indicator? If so what is the position and format of the indicator?
4. Is the number of groups constant? or do you need to dynamically find out as to how many group exist and then divide the input file into 2 files? or do you want the split to happen for every 25,000 groups?

5. Last but not least run the following Job and show us the complete sysout, so that we can determine the level of DFSORT you have at your shop.

Code:

//STEP0100 EXEC PGM=SORT         
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *                 
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                 
  OPTION COPY                   
//*
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat Apr 05, 2014 4:03 am    Post subject:
Reply with quote

Rohit Umarjikar wrote:
I believe you would want to sort the details between the headers.

ftp://ftp.software.ibm.com/storage/dfsort/mvs/sorttrck.pdf

Thanks,
Rohit



Rohit,

Please understand the question before you suggest a solution. OP clearly mentioned he does NOT want to SORT the groups. Why would you suggest a sorting Groups Solution?

sauthor wrote:
Group should not be changed or sorted.


It would make sense if had you suggested "Include or omit groups of records" trick instead of "Sort detail records between headers and trailers"

I appreciate your help, if you are suggesting something way off it is double the work for me.
Back to top
View user's profile Send private message
sauthur

New User


Joined: 26 Nov 2013
Posts: 4
Location: USA

PostPosted: Sat Apr 05, 2014 6:29 am    Post subject:
Reply with quote

Its an EDI message. HD is the identifier for header TRL is the trailer. But no identifier for detail records. No detail record start with HD or TRL. All start at 1.
Back to top
View user's profile Send private message
sauthur

New User


Joined: 26 Nov 2013
Posts: 4
Location: USA

PostPosted: Sat Apr 05, 2014 6:49 am    Post subject:
Reply with quote

1. How do you identify the Header? Is there an indicator? If so what is the position and format of the indicator?
Ans: Header Starts with 'HD' start at 1
2. How do you identify the detail record? Is there an indicator? If so what is the position and format of the indicator?
Ans: No Identifier But start at position 1 (Not HD or TRL)
3. How do you identify the trailer record? Is there an indicator? If so what is the position and format of the indicator?
Ans: Trailer Start with TRL at position 1
4. Is the number of groups constant? or do you need to dynamically find out as to how many group exist and then divide the input file into 2 files? or do you want the split to happen for every 25,000 groups?
Ans: Only First file is used for Processing which can have max 25000 Message groups. All the message groups beyond 25000 should go to second file which is kind of back up.
If say input file has only 20000 message groups then all should go to first file
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Apr 07, 2014 10:20 pm    Post subject: Reply to: Splitting VB File with Goups
Reply with quote

Code:

//STEP0100 EXEC PGM=SORT                                             
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD DISP=SHR,DSN=Your Input VB File
//OUT1     DD SYSOUT=*                                               
//OUT2     DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,8X,5)),                         
  IFTHEN=(WHEN=GROUP,BEGIN=(13,2,CH,EQ,C'HD'),END=(13,3,CH,EQ,C'TRL'),
  PUSH=(5:ID=8))                                                     
                                                                     
  OUTFIL FNAMES=OUT1,INCLUDE=(5,8,ZD,LE,25000),BUILD=(1,4,13)         
  OUTFIL FNAMES=OUT2,SAVE,BUILD=(1,4,13)                             
//*
Back to top
View user's profile Send private message
sauthur

New User


Joined: 26 Nov 2013
Posts: 4
Location: USA

PostPosted: Mon Apr 07, 2014 11:20 pm    Post subject:
Reply with quote

Thanks a lot, It worked as perfect
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 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
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm


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