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

How to give the syncsort command here for the required field


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sripriya

New User


Joined: 19 Apr 2005
Posts: 26

PostPosted: Mon Mar 20, 2006 12:31 pm
Reply with quote

Hi all,

1. I have 2 files. The first file has the data as shown below.
ACN_NO 1 CHAR 12,
RESTALL 13 CHAR 980

The second file has the data as shown below.

ACN_NO1 1 CHAR 12,
RESTALL1 13 CHAR 980

Condition is to see whether the ACN_NO of the input file 1 and ACN_NO1 of the input file 2 are are the same. Then only those records wherein ACN_NO and ACN_NO1 are not equal are moved to the output file and the ACN_NO,RESTALL fields of the input file 1 are reformatted.

Can I know how to give the syncsort command here for the required fields.

2. Also I have another file with the data as shown below.

ACN_NO 1 CHAR 12,
RESTALL 13 CHAR 980,
cif 10 CHAR 3

A condition is checked wherein the ACN_NO is equal to '900000000000' and cif is equal to 'CIF'. Then all the records which satisfy the above condition are rejected and the remaining records are sorted based on the ACN_NO and the final list of records is moved into the output file and the fields ACN_NO,RESTALL are reformatted.

Can I know how to give the syncsort command here for the required fields.


Thanks in advance,
Sripriya
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Mon Mar 20, 2006 11:41 pm
Reply with quote

Sripriya,



Quote:

Condition is to see whether the ACN_NO of the input file 1 and ACN_NO1 of the input file 2 are are the same. Then only those records wherein ACN_NO and ACN_NO1 are not equal are moved to the output file and the ACN_NO,RESTALL fields of the input file 1 are reformatted.

Can I know how to give the syncsort command here for the required fields.


I don't know of any SYNCSORT commands that will accomplish this. Maybe someone will know of some SYNCSORT tricks.



Quote:

A condition is checked wherein the ACN_NO is equal to '900000000000' and cif is equal to 'CIF'. Then all the records which satisfy the above condition are rejected and the remaining records are sorted based on the ACN_NO and the final list of records is moved into the output file and the fields ACN_NO,RESTALL are reformatted.

Can I know how to give the syncsort command here for the required fields.


I'm assuming that you mean the record layout is:

ACN_NO 1 CHAR 12,
RESTALL 13 CHAR 980,
cif 993 CHAR 3

otherwise cif overlays ACN_NO and RESTALL

I believe the command you need is :

OMIT COND=(1,12,CH,EQ,C?900000000000?,AND,993,3,CH,EQ,C?CIF?)

Please come back if I don't understand your question

Dave
Back to top
View user's profile Send private message
pspreddy

New User


Joined: 14 Mar 2006
Posts: 24
Location: Chicago

PostPosted: Tue Mar 21, 2006 4:45 am
Reply with quote

Hi Sripriya,

When you say the files contain data like

ACN_NO 1 CHAR 12,
RESTALL 13 CHAR 980

Are you giving the file layout here or the actual data in the file.

If your are giving the file layout, then there is an easy solution to your first question also if you have DFSORT supported by your shop. You can use ICETOOL to sort all the records from both the input files 1 & 2 on ACN_NO to another file 3 and then you can select all records that are not dulpicates on to anther output file which I beleive is your requirement

Sort both your files into File3

Then the ICETOOL commands would look like

//TOOLIN DD *
SELECT FROM(FILE3)-
TO(OUTFILE)-
ON(1,12,CH)-
NODUPS
//*

I couldn't undersdtand the later part of your first question when you said "and the ACN_NO,RESTALL fields of the input file 1 are reformatted". Can you please elaborate this?

Your second requirement can be fulfilled using Dave's solution.

Please let me know if I'm not clear or in case you have any questions.

Thanks
Sivaprasad
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 RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top