How to ‘Sort’ Input dataset in JCL

Sort card you can write in JCL to select few fields from input dataset and after sorting you can write those records into output file. The JCL is good sort example.