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
 

 

Need help on splice or GROUP function

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

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Sun Aug 16, 2009 4:50 pm    Post subject: Need help on splice or GROUP function
Reply with quote

I have below requirement.

I have an 80 byte FB file as follows:

File a:

Code:

Matching key:(1-20) amount  date
xxxxxxxxxxxxx       123     11-dec
xxxxxxxxxxxxx       123.2   12-dec
yyyyyyyyyyyyy       124.1   11-dec
yyyyyyyyyyyyy       124     12-dec
yyyyyyyyyyyyy       126.2   12-dec
zzzzzzzzzzzzzzz     125     11-dec


If you see above file, there are duplicates found in matching for different amount and different date or same date.

I want to flattern all duplicate records into single record as follows:

Output:

Code:

Matching Key        amt1    date1   amt2   date2   amt3   date3
xxxxxxxxxxx         123     11-dec  123.2  12-dec  ----   -----
yyyyyyyyyyy         124.1   11-dec  124    12-dec  126.2  12-dec
zzzzzzzzzzzzz       125     11-dec
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: Mon Aug 17, 2009 10:30 pm    Post subject:
Reply with quote

What is the maximum number of duplicates you expect for a single key?
What is the maximum number of amt/date fields you expect in an output record? Can one key require more than one line?
Back to top
View user's profile Send private message
noorkh

New User


Joined: 06 Mar 2006
Posts: 76
Location: Chennai

PostPosted: Tue Aug 18, 2009 12:51 am    Post subject: Reply to: Need help on splice or GROUP function
Reply with quote

Hi Frank,
Thanks for your reply.
Maximum duplicate could be 50.
As maximum duplicate is 50, i expect maximum 50 amount/date fields in output.
I need 1 key in single line.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Aug 18, 2009 1:21 am    Post subject: Reply to: Need help on splice or GROUP function
Reply with quote

noorkh,

It can be done with group or splice depending on your version of SORT.

Can you provide me with the following details?

1. what is the cobol layout of the input file
2. what is LRECL and recfm of the input and desired OUTPUT file?

run this job and show me the sysout which would help me determine the level of DFSORT you are running

Code:

//STEP0100 EXEC PGM=SORT   
//SYSOUT   DD SYSOUT=*     
//SORTIN   DD *           
//SORTOUT  DD SYSOUT=*     
//SYSIN    DD *           
  SORT FIELDS=COPY         
/*                         
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 find RACF group for access to spooled... jzhardy JCL & VSAM 1 Mon May 08, 2017 11:46 am
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Need Help with : IFTHEN(WHEN=GROUP) Sumanta_89 DFSORT/ICETOOL 1 Wed Apr 19, 2017 5:23 pm
No new posts Group elements using ICETOOL Learncoholic DFSORT/ICETOOL 2 Fri Apr 14, 2017 11:01 am
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 4 Wed Mar 22, 2017 7:46 am


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