IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

SYNCSORT SPLICE Command Issue


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Fri May 09, 2008 12:05 am
Reply with quote

I'm trying to execute the below job.

Code:

//S1      EXEC PGM=SYNCTOOL                                         
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//IN1      DD DISP=SHR,DSN=VKIT.VI.RCS.ESMC                         
//*                                                                 
//T1       DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//T2       DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(MOD,PASS)
//OUT1     DD SYSOUT=*                                             
//OUT2     DD SYSOUT=*                                             
//OUT      DD SYSOUT=*                                             
//TOOLIN   DD *                                                     
    SORT FROM(IN1) TO(T1) USING(CNT0)                               
    SORT FROM(IN1) TO(T1) USING(CNT1)                               
    COPY FROM(T1) TO(OUT1)                                         
    SPLICE FROM(T1) TO(T2) ON(1,9,CH) ON(11,9,CH) -                 
    WITH(11,9) KEEPNODUPS                                           
    COPY FROM(T2) TO(OUT) USING(CNT2)                               
/*                                                                 
//CNT0CNTL DD *                                                     
 SORT FIELDS=(236,9,CH,A)                                           
 INCLUDE COND=(1,3,CH,NE,C'000',AND,(215,1,CH,EQ,C'X',OR,           
                                     215,1,CH,EQ,C'R'),AND,         
               258,1,CH,NE,C'O',AND,                               
               33,1,CH,EQ,C'P')                                     
 OUTFIL FNAMES=T1,NODETAIL,LINES=60,REMOVECC,                       
 SECTIONS=(236,9,                                                   
 TRAILER3=(1:236,9,11:COUNT))                                       
/*                                                                 
//CNT1CNTL DD *                                                     
 SORT FIELDS=(236,9,CH,A)                                         
 INCLUDE COND=(1,3,CH,NE,C'000',AND,(215,1,CH,EQ,C'X',OR,         
                                     215,1,CH,EQ,C'R'),AND,       
               258,1,CH,EQ,C'O',AND,                             
               33,1,CH,EQ,C'P')                                   
 OUTFIL FNAMES=T1,NODETAIL,LINES=60,REMOVECC,                     
 SECTIONS=(236,9,                                                 
 TRAILER3=(1:236,9,21:COUNT))                                     
/*                                                               
//CNT2CNTL DD *                                                   
  OUTFIL FNAMES=OUT,LINES=60,                                     
  HEADER1=(15:'MASS CARD PRINTED ZIP STAT - POV -   REPORT'),     
  HEADER2=(1:'ZIP CODE',12:'CARDS BATCH',26:'CARDS ONLINE',/,     
           1:'**********',12:'*************',26:'*************'),
  OUTREC=(1,9,11:11,9,21:21,9,80:X),                             
 TRAILER1=(/,15:'TOTAL NUMBER OF CARDS ISSUED:',COUNT)           
/*                                                               


The Output is comming as below:

Code:

              MASS CARD PRINTED ZIP STAT - POV -   REPORT     
ZIP CODE   CARDS BATCH   CARDS ONLINE                         
********** ************* *************                       
09094          139                                           
09099          141                                           
09102                      3                                 
09102          801                                           
                                                             
              TOTAL NUMBER OF CARDS ISSUED:       4           


Expected Output as below:

Code:

              MASS CARD PRINTED ZIP STAT - POV -   REPORT     
ZIP CODE   CARDS BATCH   CARDS ONLINE                         
********** ************* *************                       
09094          139                                           
09099          141                                           
09102          801                       3                                 
                                                             
          TOTAL NUMBER OF CARDS ISSUED:       1081           (i.e..139+141+801)


Can any one help me on this?
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Fri May 09, 2008 12:34 am
Reply with quote

jpdeshai,

SYNCSORT will not support SPLICE exactly what it is suppoting in DFSORT.
I had tested few cases and came to this conclusion.

You need to modify the SPLICE to have the JOIN to achive the final results.
Please post some dummy data for the input.so that some one can give you the solution.

Thanks
Krishy
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Fri May 09, 2008 1:10 am
Reply with quote

Hi Krishy,
Here are the details

The Input:
ZIP NAME PRTINTED ONLINE/BATCH
09094 JP1 Y O
09094 JP2 Y O
09094 JP3 Y O
09094 JP4 Y B
09094 JP4 N

09099 GP Y B

09102 DJ Y B
09102 VK1 Y O
09102 VK2 Y B
09102 VK3 Y O

09104 VK3 N
09104 VK3 N
09104 VK3 N

The result should be :
ZIP PRINTED ONLINE PRINTED BATCH TOT PRINTED
09094 3 1 4
09099 1 0 1
09102 2 2 4
Back to top
View user's profile Send private message
jpdeshai

New User


Joined: 24 Jun 2007
Posts: 57
Location: US

PostPosted: Fri May 09, 2008 1:15 am
Reply with quote

Cleare Details:

//******* THE INPUT:
//*
ZIP NAME PRTINTED ONLINE/BATCH
//*
09094 JP1 Y O
09094 JP2 Y O
09094 JP3 Y O
09094 JP4 Y B
09094 JP4 N
09099 GP Y B
09102 DJ Y B
09102 VK1 Y O
09102 VK2 Y B
09102 VK3 Y O
09104 VK3 N
09104 VK3 N
09104 VK3 N
//*
//****** THE RESULT SHOULD BE :
//*
ZIP PRINTED-ONLINE PRINTED-BATCH TOT-PRINTED
//*
09094 3 1 4
09099 1 0 1
09102 2 2 4
TOTAL 6 3 9
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Fri May 09, 2008 2:27 am
Reply with quote

???? I already answered this for DFSORT over at:

ibmmainframes.com/viewtopic.php?t=30571

with one pass that doesn't use SPLICE.
Back to top
View user's profile Send private message
sril.krishy

Active User


Joined: 30 Jul 2005
Posts: 183
Location: hyderabad

PostPosted: Fri May 09, 2008 7:43 pm
Reply with quote

That's called 'EXPERTISE' .Frank,you are great !

Krishy
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top