Hello,
I am trying to build user defined function in z/OS system. I gave a PDS name in the jcl but I am getting message
ERROR: OUTLIB= requires a three level name: IFILE1. WARNING: The following functions will NOT be saved: maxx
Can someone help me with an example in z/OS system.
I was able to execute below code. But I am not sure where WORK.ABC.XYZ resides nor where the function is saved.
OPTIONS CMPLIB=WORK.ABC ; PROC FCMP OUTLIB = WORK.ABC.XYZ ; FUNCTION MAXX(X,Y); IF X>=Y THEN RETURN(X); ELSE RETURN(Y); ENDSUB; RUN; DATA _NULL_; A = MAXX(4,122343457); PUT A ; RUN;
NOTE: Function MAXX saved to WORK.ABC.XYZ. NOTE: The PROCEDURE FCMP used 0.06 CPU seconds and 31119K.
Unlike most procedues, we specify a three level name in the Outlib Option to FCMP. The three levels consist of a libname, a data set name and a package name. A package is the structure that the function is saved and retrieved to/from. A data set can contain multiple packages and a package can contain multiple functions.
Hope this makes sense 🙂
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.