Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Is it possible to separate the omitted records alone?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 3:43 pm    Post subject: Is it possible to separate the omitted records alone?
Reply with quote

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
View user's profile Send private message

expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 22, 2009 3:46 pm    Post subject:
Reply with quote

Yes, it is possible. Which SORT product do you use
Back to top
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 3:53 pm    Post subject: Reply to: Hi , Is it possible to separate the omitted record
Reply with quote

Hi,
I just gave PGM=SORT . thats it
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 22, 2009 4:01 pm    Post subject:
Reply with quote

SYNCSORT or DFSORT ................
You need to read the product documentation and look at the INCLUDE or OMIT statements.
Back to top
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 4:06 pm    Post subject:
Reply with quote

Hi,
Should i want to try using SYNCSORT option
Can u explain
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 4:11 pm    Post subject:
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 22, 2009 4:13 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 4:24 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 4:38 pm    Post subject:
Reply with quote

So did that work for you? If not, what error/output did you get?
Back to top
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 4:55 pm    Post subject:
Reply with quote

Hi,

Actually how to include the step to separate as 2 output files ..

I cant understand ..
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8593
Location: Back in jolly old England

PostPosted: Mon Jun 22, 2009 5:04 pm    Post subject:
Reply with quote

Click HERE to see just one result from a simple search of the forum.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Jun 22, 2009 6:03 pm    Post subject:
Reply with quote

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... icon_confused.gif
Back to top
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Mon Jun 22, 2009 7:40 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2171
Location: @my desk

PostPosted: Mon Jun 22, 2009 7:54 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Alissa Margulies

SYNCSORT Support


Joined: 25 Jul 2007
Posts: 500
Location: USA

PostPosted: Mon Jun 22, 2009 7:58 pm    Post subject:
Reply with quote

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
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Tue Jun 23, 2009 10:24 am    Post subject: Reply to: Is it possible to separate the omitted records alo
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Tue Jun 23, 2009 11:06 am    Post subject: Reply to: Is it possible to separate the omitted records alo
Reply with quote

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
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Tue Jun 23, 2009 11:15 am    Post subject:
Reply with quote

Hi,

try
Code:
OMIT=(
instead of
Code:
OMIT COND=(



Gerry
Back to top
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Tue Jun 23, 2009 11:16 am    Post subject:
Reply with quote

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
View user's profile Send private message
Gay251319

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Tue Jun 23, 2009 11:24 am    Post subject:
Reply with quote

Hi ,

Yes I tried that option also

OMIT=(...........

But it shows the same error
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts abend sort based on count records in ... anatol DFSORT/ICETOOL 5 Mon Oct 17, 2016 10:10 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us