0

I want to sort datasets both FB and VB on full length using JCL. I have large number of datasets so I dont want to get file length. is there a way to sort files without feeding in the file length? Sorting should be done on full length of the file. Appreciate our help. Thanks.

vishnu
  • 11
  • 1
    I presume you mean full `length of the record` ??? – Bruce Martin Aug 22 '18 at 10:13
  • A combination of **Rexx** and **ISPF skelton** generation will achieve what you want. Have a look at https://stackoverflow.com/questions/51240074/executing-a-dfsort-using-rexx/51240979#51240979 It covers the ISPF skelton generation – Bruce Martin Aug 22 '18 at 10:17
  • Thanks Bruce but unfortunately i can't use Rexx here. :( – vishnu Aug 22 '18 at 13:28
  • It's not clear to me what you're asking. You have a list of datasets, and you want to sort them based on the size of the dataset, correct? Or based on the record length of the dataset? What tools do you have available? JCL in and of itself can't do this; JCL is just a way of invoking other programs to do work for you. – Kevin McKenzie Aug 22 '18 at 17:23
  • Kevin, i have thousands of datasets (i'm not sure how many more yet to come) to sort them on their record length. I found it difficult to get record length and build sort control card dynamically. I have JCL and DFSORT utilities. – vishnu Aug 23 '18 at 07:54
  • Still not clear: are you wanting to sort the list of data sets or sort the data within each data set? And why can you not use Rexx? It is perfect for the job. As an alternative you could use COBOL (or whatever ISPF-supporting language you use in your shop) and ISPF File Tailoring. – NicC Aug 24 '18 at 09:26
  • I want to sort the data in each datasets. I want a way to sort the data without feeding in the record length. Rexx is not an acceptable configuration item to deploy into production at my client place. – vishnu Aug 24 '18 at 12:42
  • Then use COBOL, if that is the preferred language, and use it to connect to ISPF to execute LISTDSI for each data set and retrieve the LRECL from the output and do the file tailoring for each data set. – NicC Aug 25 '18 at 09:18
  • yes.. that's the way to go.. Thank you. – vishnu Aug 30 '18 at 12:33
  • Is there a fixed area that is common to both FB and the VB records (a minimum area that is always present?) You could create a SORT CARD based on the LRECL of the file in a step preceding sort. – Hogstrom Sep 04 '18 at 01:05

0 Answers0