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 

Split a file into different files
Goto page Previous  1, 2
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jul 22, 2004 2:44 pm    Post subject: Reply with quote

Frank,

Thanks for reminding me about the EQUALS parm. I always keep forgetting the EQUALS parameter. Sad

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


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Thu Jul 22, 2004 3:03 pm    Post subject: Reply with quote

Thanx again Smile

Even my mainframe does not respond this fast.

Frank / Kolusu, Can you please throw some light on EQUALS parm ?

Does it mean:

Concatenate the records (SUM the fields) with equal sequence numbers Question

Quote:

OUTREC=(C' OUTFIL FNAMES=BATCH',SEQNUM,3,ZD,
C',STARTREC=',+1,ADD,3,8,ZD,EDIT=(TTTTTTTT),
C',ENDREC=00000000',80:X,SEQNUM,8,ZD)
OUTFIL FNAMES=BT,INCLUDE=(1,2,CH,EQ,C'BT'),
OUTREC=(49X,+1,SUB,3,8,ZD,EDIT=(TTTTTTTT),80:X,SEQNUM,8,ZD)


Kolusu, Can you please explain this code ?
_________________
Regards,
Programmer
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: Thu Jul 22, 2004 3:25 pm    Post subject: Reply with quote

Programmer1,

EQUALS guarantees that the first of a series of equal-keyed records is either first-in (SORT) or from the lowest numbered SORTINnn data set (MERGE). With NOEQUALS, there is a random element to the order in which records with identical control fields will appear in the output. With or without EQUALS, MERGE preserves the order of equal-keyed records within any one data set.

When used in conjunction with SUM, EQUALS indicates which of the equal-keyed records will be preserved, containing the sum: the record occurring first in SORTIN (for a sort), or drawn from the SORTINnn data set with the lowest nn number (for a merge) will contain the totaled fields.

The EQUALS option can also be specified on the SORT/MERGE control statement. The specification on the control statement takes precedence over the specification in the PARM field.

Quote:

Kolusu, Can you please explain this code ?

OUTREC=(C' OUTFIL FNAMES=BATCH',SEQNUM,3,ZD,
C',STARTREC=',+1,ADD,3,8,ZD,EDIT=(TTTTTTTT),
C',ENDREC=00000000',80:X,SEQNUM,8,ZD)
OUTFIL FNAMES=BT,INCLUDE=(1,2,CH,EQ,C'BT'),
OUTREC=(49X,+1,SUB,3,8,ZD,EDIT=(TTTTTTTT),80:X,SEQNUM,8,ZD)



    1.C' OUTFIL FNAMES=BATCH' means write a text of OUTFIL FNAMES=BATCH

    2.SEQNUM,3,ZD, means write a seqnum for a length of 3 bytes in numeric format.

    3.C',STARTREC=', means write a text of ,STARTREC=

    4.+1,ADD,3,8,ZD, means add +1 to the value at postion 3 which is 8 bytes long and

    5.EDIT=(TTTTTTTT) means print out the result after the arthimetic operation is complete

    6. C',ENDREC=00000000', means write out a text of ',endrec=00000000'

    7.80:X) means pad spaces to the 80th byte.

    8.SEQNUM,8,ZD means write a seqnum for a length of 8 bytes in numeric format.

    9.OUTFIL FNAMES=BT,INCLUDE=(1,2,CH,EQ,C'BT') means write out all the records which have 'BT' in the first 2 bytes to the file associated to the DD name BT

    10. 49X means put 49 spaces in the first 49 bytes. This is done so that endrec count is
    lined up with endrec parm on the header file.

    11. +1,SUB,3,8,ZD means subtract 1 from the value at postion 3 which is 8 bytes long and

    12. EDIT=(TTTTTTTT) means print out the result after the arthimetic operation is complete

    13. 80:X) means pad spaces to the 80th byte.

    14. SEQNUM,8,ZD means write a seqnum for a length of 8 bytes in numeric format.



For a better understanding refer the DFSORT Application Programming Guide

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
programmer1
Beginner


Joined: 18 Feb 2004
Posts: 138
Topics: 14

PostPosted: Thu Jul 22, 2004 3:33 pm    Post subject: Reply with quote

Kolusu / Frank,

Hats Off to you !!
_________________
Regards,
Programmer
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
Goto page Previous  1, 2
Page 2 of 2

 
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