Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Join multi Records by key

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
kregen

New User


Joined: 16 Mar 2006
Posts: 14

PostPosted: Tue Jul 01, 2008 6:02 pm    Post subject: Join multi Records by key
Reply with quote

Hello,
i want to merge the data of multi records in one dataset by key.

input dataset
RECL = 24
RECFM = FB
KEYL = 17 max Records per Key 400
Datalen = 7

inputdata
Code:
VSSZZZ6KZXR423833G   PE2
VSSZZZ6KZXR423833G   PH1
VSSZZZ6KZXR423833LAAUE0A
VSSZZZ6KZXR423833LABR1PA
VSSZZZ6KZXR423833LABV0Q0
WVWZZZ3BZYE190021LAED0DE
WVWZZZ3BZYE190021LAGM0GF
WVWZZZ3BZYE190021LAHV1D0
WVWZZZ3BZYE190032LGAB0L2
WVWZZZ3BZYE190032LGEN8GL
WVWZZZ3BZYE190032IGSPG0C


output dataset
RECL = 2833
RECFM = FB
1 record per key

outputdata
Code:
VSSZZZ6KZXR423833G   PE2LAAUE0ALABR1PALABV0Q0
WVWZZZ3BZYE190021LAED0DELAGM0GFLAHV1D0
WVWZZZ3BZYE190032LGAB0L2LGEN8GLIGSPG0C


Is there a way to do this with DFSORT?

thanks for help
kregen
Back to top
View user's profile Send private message
References
PostPosted: Tue Jul 01, 2008 6:02 pm    Post subject: Re: Join multi Records by key Reply with quote

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 970
Location: Virginia, USA

PostPosted: Tue Jul 01, 2008 6:09 pm    Post subject:
Reply with quote

What happened to
Code:
"VSSZZZ6KZXR423833G   PH1"
?
Back to top
View user's profile Send private message
kregen

New User


Joined: 16 Mar 2006
Posts: 14

PostPosted: Tue Jul 01, 2008 6:11 pm    Post subject: Re: Join multi Records by key
Reply with quote

little correction for the outputdata

Hello,

i want to merge the data of multi records in one dataset by key.

input dataset
RECL = 24
RECFM = FB
KEYL = 17 max Records per Key 400
Datalen = 7

inputdata
Code:
VSSZZZ6KZXR423833G   PE2
VSSZZZ6KZXR423833G   PH1
VSSZZZ6KZXR423833LAAUE0A
VSSZZZ6KZXR423833LABR1PA
VSSZZZ6KZXR423833LABV0Q0
WVWZZZ3BZYE190021LAED0DE
WVWZZZ3BZYE190021LAGM0GF
WVWZZZ3BZYE190021LAHV1D0
WVWZZZ3BZYE190032LGAB0L2
WVWZZZ3BZYE190032LGEN8GL
WVWZZZ3BZYE190032IGSPG0C


output dataset
RECL = 2833
RECFM = FB
1 record per key

outputdata
Code:
VSSZZZ6KZXR423833G   PE2G   PH1LAAUE0ALABR1PALABV0Q0
WVWZZZ3BZYE190021LAED0DELAGM0GFLAHV1D0
WVWZZZ3BZYE190032LGAB0L2LGEN8GLIGSPG0C


Is there a way to do tis with ICETOOTL or DFSORT?

thanks for help
kregen
Back to top
View user's profile Send private message
Skolusu

DFSORT Developer


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

PostPosted: Tue Jul 01, 2008 10:46 pm    Post subject:
Reply with quote

kregen,

The following DFSORT JCL will give you the desired results. i just showed for a max of 8 records per key and you can adjust that to 400 records per key

Code:

//STEP0100 EXEC PGM=ICEMAN       
//SYSOUT   DD SYSOUT=*           
//SORTIN   DD *                 
VSSZZZ6KZXR423833G   PE2         
VSSZZZ6KZXR423833G   PH1         
VSSZZZ6KZXR423833LAAUE0A         
VSSZZZ6KZXR423833LABR1PA         
VSSZZZ6KZXR423833LABV0Q0         
WVWZZZ3BZYE190021LAED0DE         
WVWZZZ3BZYE190021LAGM0GF         
WVWZZZ3BZYE190021LAHV1D0         
WVWZZZ3BZYE190032LGAB0L2         
WVWZZZ3BZYE190032LGEN8GL         
WVWZZZ3BZYE190032IGSPG0C         
//SORTOUT  DD SYSOUT=*           
//SYSIN    DD *                                               
  INREC IFTHEN=(WHEN=INIT,                                     
       OVERLAY=(25:SEQNUM,3,ZD,RESTART=(1,17),30:2800Z)),     
  IFTHEN=(WHEN=(25,3,ZD,EQ,001),OVERLAY=(0030:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,002),OVERLAY=(0037:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,003),OVERLAY=(0044:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,004),OVERLAY=(0051:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,005),OVERLAY=(0058:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,006),OVERLAY=(0065:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,007),OVERLAY=(0072:18,7)),         
  IFTHEN=(WHEN=(25,3,ZD,EQ,008),OVERLAY=(0079:18,7))           
  SORT FIELDS=(1,17,CH,A)                                     
  SUM FIELDS=(30,8,38,8,46,8,54,8,62,8,70,8,78,8),FORMAT=BI   
  OUTREC BUILD=(1,17,30,56,TRAN=ALTSEQ)                       
  ALTSEQ CODE=(0040)                                           


The output from this job is

Code:

VSSZZZ6KZXR423833G   PE2G   PH1LAAUE0ALABR1PALABV0Q0   
WVWZZZ3BZYE190021LAED0DELAGM0GFLAHV1D0                 
WVWZZZ3BZYE190032LGAB0L2LGEN8GLIGSPG0C                 
Back to top
View user's profile Send private message
kregen

New User


Joined: 16 Mar 2006
Posts: 14

PostPosted: Wed Jul 02, 2008 12:30 pm    Post subject: Reply to: Join multi Records by key
Reply with quote

very big thanks for your help...

it works as i like it....

have a nice day

kregen
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1