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
 

 

How to give the syncsort command here for the required field

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to give the syncsort command here for the required field
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    Post subject: Re: How to give the syncsort command here for the required f
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    Post subject: Re: How to give the syncsort command here for the required f
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts scheduling between OPC and TWS give u... nsbl IBM Tools 4 Sun Mar 12, 2017 5:35 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm


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