On Mon, 5 Aug 2019 10:55:00 +1000, Andrew Rowley wrote: >On 1/08/2019 8:03 am, Ron Thomas wrote: >> >> We have a FB File LRECL = 80 bytes and here below is the layout. Buy_price >> is at position 65 of length 10 bytes . We need to pull those item nbrs >> which has same UPC,Vendor nbr ,State Code but there is price difference. >> Could anyone let me know how this to be done using dfsort. > >I am curious, why do you want to use Sort to perform these tasks? > +1 I'm probably partisan, but I'd look to Rexx or awk, both of which provide useful associative arrays.
>The solutions are ingenious, but I wonder whether someone will be able >to understand them if modification is required in the future. > >Maybe a more general programming language would be better? > Perhaps Sort is the language most generally understood among the readers of the list. Or the one that elicits the most useful answers. On Thu, 1 Aug 2019 09:21:22 -0400, Cameron Conacher wrote: >... >I have a file of data containing extracts from some JCL. >Specifically, I am looking for all values of DATACLAS. >This all relates back to Pervasive Encryption. I just want a quick report >of the DATACLAS values in use today, as well as the counts for each >DATACLAS item I find. > >I ran a quick compare to get a report from our JCL Library, and now I am >building a SORT to look at the variable length input file data. >... Again, I'd look first to Rexx PARSE or sed regular expressions. There's considerable animus to regex in this list, but its complexity pales compared to Sort. I see error sources regardless: o JCL comments might look like DD statements, causing false positives. o Instream data sets even more so. o JCL might be built with symbol substitution, causing false negatives. o Likewise arguments to PROCs. The Swiss Army Knife is a wondrous facility, but there is probably a better tool to drive in a nail. (OT: is DFSORT Turing-complete?) -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN