View previous topic :: View next topic
|
Author |
Message |
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Is it possible to omit the particular records from the input file
and get 2 outputs at a time ??
One is the file having records apart from omitted(the original output file )
And Other is the file having only omitted records alone |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Yes, it is possible. Which SORT product do you use |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi,
I just gave PGM=SORT . thats it |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
SYNCSORT or DFSORT ................
You need to read the product documentation and look at the INCLUDE or OMIT statements. |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi,
Should i want to try using SYNCSORT option
Can u explain |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Quote: |
I just gave PGM=SORT . thats it |
Story does not end here -- there is a lot more.
Have a look on the messages populated in the SYSOUT of some sort job, if they are of type ICEXXX you use DFOSRT if are of type WERXXX you use SyncSort else CA-sort.
Show some example of input, expected output from that and the rules to generate the output. Tell us the RECFM and LRECL of input/output. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
When you code PGM=SORT it will run the SORT product which is installed at your site.
When you look at the SYSOUT from the run, the message codes will begin either
WER - which means that your product is SYNCSORT
ICE - which means that your product is DFSORT
Also, you need to supply a lot more information that you already have
1) RECFM & LRECL of the input file
2) What are the key fields that you want to INCLUDE or OMIT, position, length and format
3) What are the conditions to INCLUDE or OMIT |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
The messages in the sysout start with WER -- so my product is SYNCSORT
And the key fields are
SORT FIELDS=COPY
OMIT COND=(12,11,CH,EQ,C'37420120988',
OR,12,11,CH,EQ,C'37421507651',
OR,12,11,CH,EQ,C'37467000715',
OR,12,11,CH,EQ,C'37467001318',
OR,12,11,CH,EQ,C'37467002249',
OR,12,11,CH,EQ,C'37467003999',
OR,12,11,CH,EQ,C'37467004793')
RECFM=FB, LRECL=300 |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
So did that work for you? If not, what error/output did you get? |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi,
Actually how to include the step to separate as 2 output files ..
I cant understand .. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Click HERE to see just one result from a simple search of the forum. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
Gay251319 wrote: |
Actually how to include the step to separate as 2 output files .. |
Probably you can use OUTFIL FNAMES concept of SORT? But how do you decide to have only two files? Your control cards shows many COND conditions... |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Actually i need only 2 output files
In the input file 20,000 record exists
From the input file all the records except the records present in the omitted condition will come in one output file
And in another output file I need only the omitted records (that is the records given in that omitted condition)
This is my requirement |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Gay251319,
If you'd followed the link provided above by expat, you'd have found this.
Code: |
//OUT01 DD SYSOUT=*
.....
.....
//OUT10 DD SYSOUT=*
//LEFTOVER DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=COPY
.....
.....
OUTFIL FNAMES=OUT01,BUILD=(1,80),INCLUDE=(89,8,ZD,EQ,01)
.....
.....
OUTFIL FNAMES=OUT10,BUILD=(1,80),INCLUDE=(89,8,ZD,EQ,10)
OUTFIL FNAMES=LEFTOVER,SAVE |
The SAVE parameter will route all the remaining records to the LEFTOVER dataset. |
|
Back to top |
|
|
Alissa Margulies
SYNCSORT Support
Joined: 25 Jul 2007 Posts: 496 Location: USA
|
|
|
|
Try this SyncSort for z/OS 1.3 job:
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT.DATA.SET (FB/300)
//SORTOF01 DD DSN=OUTPUT.FILE1,...
//SORTOF02 DD DSN=OMITTED.RECORDS,...
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FILES=01,OMIT=(12,11,CH,EQ,L(C'37420120988',C'37421507651',C'37467000715',
C'37467001318',C'37467002249',C'37467003999',C'37467004793'))
OUTFIL FILES=02,SAVE
/* |
|
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
hi all,
thank you very much ..
But Trying the syntax given above .. I am getting syntax error
SYSIN :
SORT FIELDS=COPY
OUTFIL FILES=01,OMIT COND=(12,11,CH,EQ,C'37420120988')
*
OUTFIL FILES=02,SAVE
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
what is the error actually ?
I gave everything correctly
But i donno whats the mistake |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Gay,
Quote: |
what is the error actually ?
I gave everything correctly
But i donno whats the mistake |
May be it has got to do something with the version of syncsort that you are using.
Did you try Arun's solution ? |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
try
instead of
Gerry |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
yes I tried his solution also
It shows the same S000 U0016 abend .. syntax error
SYSIN :
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF01,BUILD=(1,300),OMIT =(12,11,CH,EQ,C'37420120988')
*
OUTFIL FNAMES=SORTOF02,SAVE
WER268A OUTFIL STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
Can you please tell what could be the reason |
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi ,
Yes I tried that option also
OMIT=(...........
But it shows the same error |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Gay251319,
Do you have a space after the OMIT?
Quote: |
It shows the same S000 U0016 abend .. syntax error
SYSIN :
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF01,BUILD=(1,300),OMIT =(12,11,CH,EQ,C'37420120988')
* |
If yes, remove the space and try moving your BUILD statement to the next line as below.
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOF01,
BUILD=(1,300),OMIT=(12,11,CH,EQ,C'37420120988')
OUTFIL FNAMES=SORTOF02,SAVE |
|
|
Back to top |
|
|
Gay251319
New User
Joined: 17 Jun 2009 Posts: 57 Location: Kochi
|
|
|
|
Hi all,
Now its working fine
Its space problem ...
Thank you very much for solving the issue .. Arun and Aaru
And also thanks for everyone for sparing time for me |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
You're welcome.
B37 ? |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Arun,
Quote: |
Its space problem
B37 ?
|
Proud of you - REAL MAINFRAMER |
|
Back to top |
|
|
|