IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is it possible to separate the omitted records alone?


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jun 22, 2009 3:46 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jun 22, 2009 4:01 pm
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
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 4:11 pm
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: 8797
Location: Welsh Wales

PostPosted: Mon Jun 22, 2009 4:13 pm
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
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 4:38 pm
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
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: 8797
Location: Welsh Wales

PostPosted: Mon Jun 22, 2009 5:04 pm
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

Superior Member


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

PostPosted: Mon Jun 22, 2009 6:03 pm
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
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: 2481
Location: @my desk

PostPosted: Mon Jun 22, 2009 7:54 pm
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: 496
Location: USA

PostPosted: Mon Jun 22, 2009 7:58 pm
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
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: 1287
Location: Chennai, India

PostPosted: Tue Jun 23, 2009 11:06 am
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: 1702
Location: Australia

PostPosted: Tue Jun 23, 2009 11:15 am
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
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
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
Arun Raj

Moderator


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

PostPosted: Tue Jun 23, 2009 12:21 pm
Reply with quote

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

New User


Joined: 17 Jun 2009
Posts: 57
Location: Kochi

PostPosted: Tue Jun 23, 2009 1:52 pm
Reply with quote

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

Moderator


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

PostPosted: Tue Jun 23, 2009 5:10 pm
Reply with quote

You're welcome.

Quote:
Its space problem
B37 ?icon_lol.gif
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Tue Jun 23, 2009 5:53 pm
Reply with quote

Arun,

Quote:
Its space problem
B37 ?


Proud of you - REAL MAINFRAMER icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
Search our Forums:

Back to Top