MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Include set of records based on fields

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
byhalia
Beginner


Joined: 30 Aug 2006
Posts: 9
Topics: 3

PostPosted: Wed Aug 30, 2006 10:59 am    Post subject: Include set of records based on fields Reply with quote

Hi ,

i am facing problem to deal with this

Input

01aaaxx
02
03
01bbbyy
02
03
01ccczzz
02
03

01,02 and 03 are record types of key aaa mentioned in first column.
So 01, 02 and 03 is one set record whose key is aaa
similary key bbb and ccc.

Output
should look after sort
01aaaxx
03
01ccczzz
03


First check for record type 01 for columns 6 for "xx" and "zz".
any other value , then omit that whole set of records.

If that that set qualifies , then include 03 record type of that set and remove 02 set.

Please help me in this

Thanks,
Byh
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 30, 2006 11:29 am    Post subject: Reply with quote

byhalia,

Try this job

Code:

//STEP0100 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//IN       DD *                                               
01AAAXX                                                       
02                                                             
03                                                             
01BBBYY                                                       
02                                                             
03                                                             
01CCCZZZ                                                       
02                                                             
03                                                             
//OUT      DD SYSOUT=*                                         
//TOOLIN   DD *                                               
  SPLICE FROM(IN) TO(OUT) ON(11,08,CH) WITH(1,10) WITHALL -   
  USING(CTL1) KEEPBASE                                         
//CTL1CNTL DD *                                               
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(11:SEQNUM,8,ZD)),           
        IFTHEN=(WHEN=(1,2,CH,NE,C'01'),                       
                OVERLAY=(19:SEQNUM,8,ZD,                       
                         11:11,8,ZD,SUB,19,8,ZD,M11,LENGTH=8)),
        IFTHEN=(WHEN=NONE,                                     
                OVERLAY=(11:SEQNUM,8,ZD,                       
                         19:01,07))                           
  OUTFIL FNAMES=OUT,                                           
  INCLUDE=(24,2,SS,EQ,C'XXZZ',AND,                             
           01,2,SS,EQ,C'0103'),                               
  OUTREC=(01,10)                                               
/*                                                             


Hope this helps..

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
byhalia
Beginner


Joined: 30 Aug 2006
Posts: 9
Topics: 3

PostPosted: Wed Aug 30, 2006 11:49 am    Post subject: Reply with quote

Thanks for quick reply. It is givng error
Code:

SYT000I  SYNCTOOL RELEASE 1.4D - COPYRIGHT 2003  SYNCSORT INC.                 
SYT001I  INITIAL PROCESSING MODE IS "STOP"                                     
SYT002I  "TOOLIN" INTERFACE BEING USED                                         
                                                                               
           SPLICE FROM(IN) TO(OUT) ON(11,08,CH) WITH(1,10) WITHALL -           
           USING(CTL1) KEEPBASE                                               
SYT050E  INVALID OPERAND ON "SPLICE" STATEMENT                                 
SYT030I  OPERATION COMPLETED WITH RETURN CODE 12                               
                                                                               
SYT015I  PROCESSING MODE CHANGED FROM "STOP" TO "SCAN" DUE TO OPERATION FAILURE
                                                                               
SYT004I  SYNCTOOL PROCESSING COMPLETED WITH RETURN CODE 12   




i removed that "-" in toolin it worls wih some other results, Seems problem with continutaiton symbol
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 30, 2006 12:12 pm    Post subject: Reply with quote

byhalia,

Can you post the First few lines from DFSMSG output? It helps to determine the version of syncsort you have .


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
byhalia
Beginner


Joined: 30 Aug 2006
Posts: 9
Topics: 3

PostPosted: Wed Aug 30, 2006 12:14 pm    Post subject: Reply with quote

SYNCSORT FOR Z/OS 1.1BNI TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002 SYNCS
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Aug 30, 2006 12:57 pm    Post subject: Reply with quote

byhalia,

try this job

Code:

//STEP0100 EXEC PGM=ICETOOL                               
//DFSMSG   DD SYSOUT=*                                     
//TOOLMSG  DD SYSOUT=*                                     
//IN       DD *                                           
01AAAXX                                                   
02                                                         
03                                                         
01BBBYY                                                   
02                                                         
03                                                         
01CCCZZZ                                                   
02                                                         
03                                                         
//HDR      DD DSN=&HDR,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//DET      DD DSN=&DET,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//BASE     DD DSN=&BASE,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE)
//CON1     DD DSN=*.HDR,VOL=REF=*.HDR,DISP=OLD             
//         DD DSN=*.DET,VOL=REF=*.DET,DISP=OLD             
//T3       DD DSN=&T3,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE) 
//CON2     DD DSN=*.BASE,VOL=REF=*.BASE,DISP=OLD           
//         DD DSN=*.T3,VOL=REF=*.T3,DISP=OLD               
//OUT      DD SYSOUT=*                                     
//TOOLIN   DD *                                           
  COPY FROM(IN)  USING(CTL1)                               
  SORT FROM(CON1) USING(CTL2)                             
  SPLICE FROM(CON2) TO(OUT) -                             
          ON(88,8,CH) -                                   
          WITH(1,80) -                                     
          WITHALL  USING(CTL3)                             
//CTL1CNTL DD *                                           
  INREC  FIELDS=(1,80,SEQNUM,8,ZD)                         
  OUTFIL FNAMES=HDR,INCLUDE=(1,2,CH,EQ,C'01'),             
  OUTREC=(1,80,8C'0',SEQNUM,8,ZD,C'H',1,7)                 
  OUTFIL FNAMES=DET,SAVE,                                 
  OUTREC=(1,88,SEQNUM,8,ZD,C'Z',7X)                       
  OUTFIL FNAMES=BASE,INCLUDE=(1,2,CH,EQ,C'01'),           
  OUTREC=(1,80,1,7,SEQNUM,8,ZD)                           
//CTL2CNTL DD *                                               
  OPTION EQUALS                                               
  INREC  FIELDS=(1,96,(81,8,ZD,SUB,89,8,ZD),M11,LENGTH=8,97,8)
  SORT   FIELDS=(97,8,ZD,A)                                   
  OUTFIL FNAMES=T3,OUTREC=(1,80,106,7,97,8)                   
//CTL3CNTL DD *                                               
  OUTFIL FNAMES=OUT,                                           
  INCLUDE=(86,2,SS,EQ,C'XXZZ',AND,                             
           01,2,SS,EQ,C'0103'),                               
  OUTREC=(01,80)                                               
/*                                                             


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
byhalia
Beginner


Joined: 30 Aug 2006
Posts: 9
Topics: 3

PostPosted: Wed Aug 30, 2006 2:02 pm    Post subject: Reply with quote

Kolusu, i appriciate ur help. It is excellent.

I used DYL280 to write a 30 line program to complete this. I will make use of this
code to understand more and more on this.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group