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
 

 

SYNCSORT - Combine two records

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Tue Nov 04, 2008 4:54 pm    Post subject: SYNCSORT - Combine two records
Reply with quote

I have two files with values below

- Spaces - 032903320 10112007 - file 1
xxxxxxxxxxxxxxxxxxxxxx - Spaces- - file 2

My Output should be

xxxxxxxxxxxxxxxxxxxxxx 032903320 10112007

i.e. in the same line.

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

byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Tue Nov 04, 2008 5:58 pm    Post subject:
Reply with quote

I was trying to execute the below code..but it failed..
Code:

//TOOLIN DD                                                 
COPY FROM(IN1) TO(T1) USING(CTL1)                           
COPY FROM(IN2) TO(T1) USING(CTL2)                           
SPLICE FROM(T1) TO(OUT1) ON(121,6,CH) WITH(98,9) USING(CTL3)
/*                                                         
//CTL1CNTL DD                                               
  OUTREC FIELDS=(1:1,120,121:SEQNUM,6,ZD)                     
/*                                                         
//CTL2CNTL DD                                               
  OUTREC FIELDS=(98:98,9,121:SEQNUM,6,ZD)                     
/*                                                         
//CTL3CNTL DD                                               
  OUTFIL FNAMES=OUT1,BUILD=(1,120)                           
/*                                                         


Can someone help??
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 04, 2008 6:23 pm    Post subject:
Reply with quote

I think that it would be rather helpful if you actually posted the output from the failure.

It failed - well, isn't really helpful.
Back to top
View user's profile Send private message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Tue Nov 04, 2008 6:32 pm    Post subject:
Reply with quote

Here it is...

IEF237I JES2 ALLOCATED TO SYSIN
IEC141I 013-34,IGG0191I,?????,S1,TOOLIN,4425,SMQ228,SYS08309.T125006.RA000.U#
IEA995I SYMPTOM DUMP OUTPUT
SYSTEM COMPLETION CODE=013 REASON CODE=00000034
TIME=12.50.06 SEQ=61762 CPU=0000 ASID=0085
PSW AT TIME OF ERROR 075C1000 80E54D96 ILC 2 INTC 0D
NO ACTIVE MODULE FOUND
NAME=UNKNOWN
DATA AT PSW 00E54D90 - 41003B7A 0A0D41F0 38BE56F0
GR 0: 00000000_00E5505C 1: 00000000_A4013000
2: 00000000_000082D0 3: 00000000_00E544E2
4: 00000000_007CF410 5: 00000000_007CF7A4
6: 00000000_007CF74C 7: 00000000_007CF7A4
8: 00000000_007CF76C 9: 00000000_00000000
A: 00000000_00FA9608 B: 00000000_007CF0DC
C: 00000000_00000005 D: 00000000_00000000
E: 00000000_80E5461A F: 00000010_00000034
END OF SYMPTOM DUMP
IEF472I U#IFG2SP S1 - COMPLETION CODE - SYSTEM=013 USER=0000 REASON=00000034


SYT000I SYNCTOOL RELEASE 1.6.0 - COPYRIGHT 2007 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED
Back to top
View user's profile Send private message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Tue Nov 04, 2008 7:02 pm    Post subject:
Reply with quote

Here is the latest error message...

CTL1CNTL :
OUTREC BUILD=(1:1,120,121:SEQNUM,8,PD)
*
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER001A COL 1 OR 1-15 NOT BLANK
Back to top
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4648
Location: Raleigh, NC, USA

PostPosted: Tue Nov 04, 2008 7:07 pm    Post subject: Reply to: SYNCSORT - Combine two records
Reply with quote

WER001A COL 1 OR 1-15 NOT BLANK

Do you think this might be part of your problem?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Wed Nov 05, 2008 4:05 am    Post subject:
Reply with quote

Hi,

how about DD * for TOOLIN CTL1CNTL CTL2CNTL CTL3CNTL


Gerry
Back to top
View user's profile Send private message
byearun

New User


Joined: 25 Jul 2005
Posts: 17

PostPosted: Wed Nov 05, 2008 6:04 pm    Post subject:
Reply with quote

That's true Gerry.

I found this reviewing the code again and fixed this issue yesterday. I thought update, but forget.

Thanks for the finding Gerry.
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Tue Nov 11, 2008 8:34 pm    Post subject:
Reply with quote

I am trying to do the same merging with different file layout
Input file 1:
Recfm=FBA
Recl=133
Code:

BUSINESS GROUP EXPRESS CASH                                           
  BILLING     ------INTERNAL SPENDING-----  ------EXTERNAL SPENDING----
  CURRENCY                                                             
                  FLAT           FLAT       MARKED-UP        MARKED-UP
             BILLING AMOUNT   US ¢ EQUIV   BILLING AMOUNT   US ¢ EQUIV
                                                                       
AUSTRIAN EURO      3,280.97       4,336.43           0.00           0.0
BELGIAN EURO       4,493.46       5,939.00           0.00           0.0
UK STERLING      205,258.29     341,980.50           0.00           0.0
INTL. EURO        42,720.50      56,463.70           0.00           0.0


Input File 2:
Recfm=VBA
Recl=255
Code:

1 DATE      BILLING              DAILY                YEARLY ACCUMULATED
            CURRENCY        FLAT BILLING AMOUNT       FLAT BILLING AMOUN
 06/11/08  AUSTRIAN EURO                $.00                   $7,565.69
           BELGIAN EURO                 $.00                   $8,102.69
           UK STERLING                  $.00                 $388,283.28
           INTL. EURO                   $.00                  $84,494.59

I want the Yearly accumulated value merged with Input file 1 at the right side.

giving output file with LRECL=255, RECFM=VBA.

But getting error:
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Tue Nov 11, 2008 8:38 pm    Post subject:
Reply with quote

Here is the Sort card i used, and the error message i got:

Sort card:
Code:

//TOOLIN DD                                                 
COPY FROM(IN1) TO(T1) USING(CTL1)                           
COPY FROM(IN2) TO(T1) USING(CTL2)                           
SPLICE FROM(T1) TO(OUT1) ON(134,6,CH) WITH(75,9) USING(CTL3)
/*                                                           
//CTL1CNTL DD                                               
  OUTREC FIELDS=(1:1,133,134:SEQNUM,6,ZD)                   
/*                                                           
//CTL2CNTL DD                                               
  OUTREC FIELDS=(98:98,9,134:SEQNUM,6,ZD)                   
/*                                                           
//CTL3CNTL DD                                               
  OUTFIL FNAMES=OUT1,BUILD=(1,150)                           
/*                                                           


Error Msg:
RC=S* 013
SYNCTOOL RELEASE 1.5.3 - COPYRIGHT 2004 SYNCSORT INC.
INITIAL PROCESSING MODE IS "STOP"
"TOOLIN" INTERFACE BEING USED


I am not sure what reclength's to be used for the files.
Please advise.
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Tue Nov 11, 2008 11:03 pm    Post subject:
Reply with quote

Are the report headings part of the input files? If not, then you can code the following SyncSort application:
Code:
//SORT1  EXEC PGM=SORT                                   
//SORTJNF1 DD DISP=SHR,DSN=INPUT.FBA133               
//SORTJNF2 DD DISP=SHR,DSN=INPUT.VBA255               
//SORTOUT  DD DISP=(NEW,CATLG),UNIT=SYSDA,SPACE=(TRK,1), 
//  DSN=OUTPUT.FILE,DCB=(RECFM=VBA)               
//SYSOUT   DD SYSOUT=*                                     
//SYSIN    DD *   
  JOINKEYS FILES=F1,FIELDS=(1,13,A)                               
  JOINKEYS FILES=F2,FIELDS=(16,13,A)                               
  REFORMAT FIELDS=(F1:1,77,F2:62,15)                               
  SORT FIELDS=COPY                                                 
  OUTFIL OUTREC=(1,92,250:X),                                     
  HEADER2=(1:C'BUSINESS GROUP EXPRESS CASH',/,                     
    3:C'BILLING',15:6C'-',C'INTERNAL SPENDING',5C'-',1X,           
     6C'-',C'EXTERNAL SPENDING',4C'-',/,                           
    1:C'  CURRENCY',/,                                             
   20:C'FLAT           FLAT       MARKED-UP        MARKED-UP',     
   75:C'YEARLY ACCUMULATED',/,                                     
   14:C'BILLING AMOUNT   US ¢ EQUIV   BILLING AMOUNT   US ¢ EQUIV',
   75:C'FLAT BILLING AMOUN ',/),FTOV
/*
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Nov 12, 2008 12:00 am    Post subject:
Reply with quote

If the headers are in the input files, try the following:
Code:
//STEP1  EXEC PGM=SORT                   
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DISP=SHR,DSN=INPUT.FBA133                   
//SORTOUT  DD DISP=(NEW,PASS),DSN=&&TEMP1,...
//SYSIN    DD *                                               
  SORT FIELDS=COPY                                         
  OUTREC OVERLAY=(134:SEQNUM,8,ZD)                         
//****************************************                 
//STEP2  EXEC PGM=SORT                   
//SORTJNF1 DD DISP=(OLD,PASS),DSN=&&TEMP1                 
//SORTJNF2 DD DISP=SHR,DSN=INPUT.VBA255                 
//SORTOUT  DD DISP=(NEW,CATLG),DSN=OUTPUT.VBA255,
//              DCB=(RECFM=VBA),...                 
//SYSOUT   DD SYSOUT=*                                       
//SYSIN    DD *                                               
   JOINKEYS FILES=F1,FIELDS=(1,13,A)               
   JOINKEYS FILES=F2,FIELDS=(16,13,A)             
   JOIN UNPAIRED,F1                               
   REFORMAT FIELDS=(F1:1,77,F2:62,15,F1:134,8)     
   SORT FIELDS=(93,8,CH,A)                         
   OUTFIL IFTHEN=(WHEN=(INIT),                   
    OVERLAY=(93:8X,251:X)),                       
    IFTHEN=(WHEN=(19,4,CH,EQ,C'FLAT'),             
    OVERLAY=(75:C'YEARLY ACCUMULATED')),           
    IFTHEN=(WHEN=(14,14,CH,EQ,C'BILLING AMOUNT'), 
    OVERLAY=(75:C'FLAT BILLING AMOUN')),           
    FTOV
/*
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Wed Nov 12, 2008 3:43 pm    Post subject:
Reply with quote

Header's are also part of the input file. I got the below error:

Code:
SYSIN :                                             
   JOINKEYS FILES=F1,FIELDS=(1,13,A)                 
   JOINKEYS FILES=F2,FIELDS=(16,13,A)               
   JOIN UNPAIRED,F1                                 
   REFORMAT FIELDS=(F1:1,77,F2:62,15,F1:134,8)       
      SORT FIELDS=(93,8,CH,A)                       
      OUTFIL IFTHEN=(WHEN=(INIT),                   
       OVERLAY=(93:8X,251:X)),                       
       IFTHEN=(WHEN=(19,4,CH,EQ,C'FLAT'),           
       OVERLAY=(75:C'YEARLY ACCUMULATED')),         
       IFTHEN=(WHEN=(14,14,CH,EQ,C'BILLING AMOUNT'),
       OVERLAY=(75:C'FLAT BILLING AMOUN')),         
       FTOV                                         
   /*                                               
   *                                                 
WER275A  NO KEYWORDS FOUND ON CONTROL STATEMENT     
WER211B  SYNCSMF  CALLED BY SYNCSORT; RC=0000       
Please advise.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Nov 12, 2008 3:46 pm    Post subject:
Reply with quote

surya,

Post here the unedited jcl which failed.
Back to top
View user's profile Send private message
sdurvasu

New User


Joined: 14 Apr 2008
Posts: 15
Location: chennai

PostPosted: Wed Nov 12, 2008 7:06 pm    Post subject:
Reply with quote

I have used the JCL procided by Alissa, the one for files with header.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2158
Location: @my desk

PostPosted: Wed Nov 12, 2008 7:27 pm    Post subject:
Reply with quote

Quote:
I have used the JCL procided by Alissa, the one for files with header.

surya,

No you have NOT. I just ran the job Alissa posted and got the below results.Whatever job you ran is not what Alissa has posted. Or else you have not posted here some vital information.
Code:
 BUSINESS GROUP EXPRESS CASH
  BILLING     ------INTERNAL SPENDING-----  ------EXTERNAL SPENDING----
  CURRENCY
                  FLAT           FLAT       MARKED-UP        MARKED-UP    YEARLY ACCUMULATED
             BILLING AMOUNT   US ¢ EQUIV   BILLING AMOUNT   US ¢ EQUIV    FLAT BILLING AMOUN

AUSTRIAN EURO      3,280.97       4,336.43           0.00           0.0            $7,565.69
BELGIAN EURO       4,493.46       5,939.00           0.00           0.0            $8,102.69
UK STERLING      205,258.29     341,980.50           0.00           0.0          $388,283.28
INTL. EURO        42,720.50      56,463.70           0.00           0.0           $84,494.59
Back to top
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Wed Nov 12, 2008 8:39 pm    Post subject:
Reply with quote

Surya,

Make sure the /* begins in column 1.
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 5 Fri Dec 02, 2016 9:47 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts Syncsort - Hard coded Value in output PORYES SYNCSORT 1 Thu Nov 03, 2016 9:23 am
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm


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