%sort would, in SAS, refer to macro code or "is a macro". So "outside of a macro" is pretty meaningless but would be usable. The code could do anything. If you cannot provide the source code of %sort we really can't answer this completely. I don't recognize this is a standard SAS supplied macro so would not even bother to guess.
IF this is SAS code set options MPRINT before executing it. That will show the statements generated by the macro in the log:
%sort(data.rade,camp_cd appl_id RADE_RELSHIP_TYP RADE_ACCT_NO,option=nodupkey)
options nomprint; /* turn off the option*/
If you have questions about the content of the log then copy ALL the text from the log, open a text box on the forum using the </> icon above the message window and pasting the text.
The text, you can see on above, is important to preserve line formatting as the main message window on this forum is known to reformat pasted text and may move stuff making it harder to understand, especially warnings and error messages.
If %sort is supposed to be from another programming language then you need to tell us what it is supposed to do.
This looks like a macro call to a site specific custom macro and though we can't know what this macro does.
If you use below two options then you'll get in the SAS log what SAS code the macro generates as well as where the macro definition is stored in your environment. That should answer your question - else please share the log created when running below and eventually also the macro definition (the code from the .sas file from the location where the log tells you it found the macro definition).
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.