@cwillden is providing a good place to learn how to do this. Another approach, is to simply do the sort interactively, and then in the new data table that is produced as a result of the sort, right click on the green triangle in front of the "Source" entry in the Table Panel on the upper left edge of the data table display and select "Edit". It will show you the script that JMP used to create the sorted data table.
Jim