开发者

Mainframe Dataset compare

开发者 https://www.devze.com 2023-02-15 18:50 出处:网络
I am having 2 Mainframe datasets. e.g. one Source and second is required. I want to select only required record(present in required file) from source file and write it to expected file.Is it possible

I am having 2 Mainframe datasets. e.g. one Source and second is required. I want to select only required record(present in required file) from source file and write it to expected file.Is it possible to do this using JCL sort? I have writ开发者_如何转开发ten one COBOL pgm to compare the files. but just wanted to check whether we can do this by using jcl sort.

Regards, Manasi


This is sometimes known as "match-merge" processing.

As is often the case, the answer to your question is "it depends."

One of the things it depends upon is which "JCL sort" product you have. DFSORT (from IBM) has the SPLICE operator which will allow you to do "match-merge" processing. SyncSort (from SyncSort Inc.) has the JOINKEY operator which will allow you to do "match-merge" processing. There exist other sort products.

Another thing it depends upon is the length of your records. I believe SyncSort has a limit of 4094 bytes for the combined lengths of all fields specified in a JOINKEY statement. I cannot speak for DFSORT in this regard.

DFSORT has a "smart tricks" document that may help if you have that product.

If you have either of these two products, you may very well be able to accomplish your goal. Hopefully I've given you the right keywords so you can get the real answer from the documentation you hopefully possess.


We can achieve the same via DFSORT or ICETOOL.

A simple JOINKEYS command will do your requirement. I may provide syntactical help if you can share the details of file structure, positions and clear requirements.

I also prefer, please make use of some examples to explain your question, so that user will be having 120% of interest to answer effectively. Hope I made you clear.


You can use SORT / Easytrieve Plus to compare the files by matching the values.

Also you can compare using option 3.13. Before that you may need to include your criteria by chossing option 3.13 then in command line 'E' - Enter. It will pop up one more screen. In that you can enter your compare column details then save it and SUBmit it when you need it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号