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 

Can I combine 2 steps in one

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


Joined: 05 Apr 2006
Posts: 56
Topics: 20

PostPosted: Sat May 06, 2006 8:20 am    Post subject: Can I combine 2 steps in one Reply with quote

Can I combine 2 step in one

Code:

//SORT005  EXEC  PGM=SORT                       
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DISP=SHR,                         
//            DSN=MY INPUT                         
//SORTOUT  DD  DSN=D2HG.JSORTDUP.TEST1,         
//             DISP=(NEW,CATLG,DELETE),         
//             SPACE=(CYL,(40,10),RLSE),       
//             DCB=(BLKSIZE=,RECFM=FB,LRECL=224)
//SYSIN    DD  *                       
 SORT FIELDS=COPY,STOPAFT=1                 
 INCLUDE COND=(01,12,CH,EQ,C'AAAAAAHEADER')
/*               
//SORT010  EXEC PGM=SORT                         
//SYSPRINT DD  SYSOUT=*                           
//SYSOUT   DD  SYSOUT=*                           
//SORTIN   DD  DISP=SHR,                         
//             DSN=MY INPUT                         
//SORTOUT  DD  DSN=D2HG.JSORTDUP.TEST1,           
//             DISP=(MOD,KEEP)                   
//SYSIN    DD  *                         
 SORT FIELDS=(47,5,CH,A)               
 OUTFIL REMOVECC,NODETAIL,             
 SECTIONS=(47,5,                       
 TRAILER3=(47,5,2X)),                 
 TRAILER1=(1/,2:'TOTAL RECORDS:',COUNT)

MY INPUT:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8
********************************* Top of Data **********************************
AAAAAAHEADER                     062006           020072230  K1R4     2006-05-06
A386166460  KNOLL       JACK   EM19240528    SH2319        51  20060501         
WA299148864 MURPHY      HELEN  IF19140523    AH2319        51  20060501         
WCD298097   DRENTEN     ALICE  LF19370126    SH2319        51  20060501         
270246766A  BECK        MONA   PF19290416    SH2319        51  20060501         
178267668A  BUBB        PAUL   EM19331218    SH3333        51  20060501         
192320807A  MILLER      RALPH  JM19400414    AH3333        51  20060601         


OUTPUT:
AAAAAAHEADER                     062006           020072230  K1R4     2006-05-06
                                                                             
H2319                                                                           
H2319                                                                           
H3333
S5743
H5884
S5566
S5584                                                           
                                                               
 TOTAL RECORDS:    5472   

Then I use line command TF30 to make output like this

AAAAAAHEADER                     062006           020072230  K1R4     20
                                                                       
H2319 H2323 H3208 H3333 H4006                                           
H4531 H4908 H5215 H5435 H5508                                           
H5665 H5884 S5566 S5584 S5715                                           
S5743                                                                   
                                                                       
 TOTAL RECORDS:    5472   

I appreciate all your help
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Sat May 06, 2006 8:28 am    Post subject: Reply with quote

ldushkin,

NO

Kolusu
_________________
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Sat May 06, 2006 6:18 pm    Post subject: Reply with quote

Idushkin,

I'm not sure how you're getting the output you show with the input and control statements you show, but just going by your first step, I believe you can get what you want in one pass using OUTFIL OMIT and HEADER1 with a DFSORT job something like the one below. I'm assuming your input file has RECFM=FB and LRECL=224 since that seems to match what
you're doing in the control statements.

Code:

//SORT005  EXEC  PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DISP=SHR,
//            DSN=MY INPUT
//SORTOUT  DD  DSN=D2HG.JSORTDUP.TEST1,
//             DISP=(NEW,CATLG,DELETE),
//             SPACE=(CYL,(40,10),RLSE),
//             DCB=(BLKSIZE=,RECFM=FB,LRECL=224)
//SYSIN    DD  *
  SORT FIELDS=(47,5,CH,A)
  OUTFIL REMOVECC,NODETAIL,
    OMIT=(01,12,CH,EQ,C'AAAAAAHEADER'),
    HEADER1=(1,224,/),
    SECTIONS=(47,5,
      TRAILER3=(47,5,2X)),
    TRAILER1=(1/,2:'TOTAL RECORDS:',COUNT)
/*


Since the output you show doesn't really match up with the input you show, it's hard to know what the count is supposed to represent. But if, for example, my job gives a count 1 less than you want because of the header, you can use COUNT+1=(M10) to adjust it. Or you can use COUNT-n=(edit) or COUNT+n=(edit) as appropriate to adjust the count.

With a better example of input and ouput, I could help you adjust it if necessary.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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