BookmarkSubscribeRSS Feed
0 Likes

Create predefined packages whose methods are the same as SAS Functions and CALL Routines by Category 

 

The methods suggested here are not currently implemented as DS2 functions, so it would make sense to add them in a package wise fashion.

 

Package ExternalFiles - suggested methods

External Files DCLOSE Function Closes a directory that was opened by the DOPEN function.
DCREATE Function Returns the complete pathname of a new, external directory.
DINFO Function Returns information about a directory.
DNUM Function Returns the number of members in a directory.
DOPEN Function Opens a directory, and returns a directory identifier value.
DOPTNAME Function Returns directory attribute information.
DOPTNUM Function Returns the number of information items that are available for a directory.
DREAD Function Returns the name of a directory member.
DROPNOTE Function Deletes a note marker from a SAS data set or an external file.
DSNCATLGD Function Verifies the existence of an external file in the z/OS system catalog by its physical name.
FAPPEND Function Appends the current record to the end of an external file.
FCLOSE Function Closes an external file, directory, or directory member.
FCOL Function Returns the current column position in the File Data Buffer (FDB).
FDELETE Function Deletes an external file or an empty directory.
FEXIST Function Verifies the existence of an external file that is associated with a fileref.
FGET Function Copies data from the File Data Buffer (FDB) into a variable.
FILEEXIST Function Verifies the existence of an external file by its physical name.
FILENAME Function Assigns or deassigns a fileref to an external file, directory, or output device.
FILEREF Function Verifies whether a fileref has been assigned for the current SAS session.
FINFO Function Returns the value of a file information item.
FNOTE Function Identifies the last record that was read, and returns a value that the FPOINT function can use.
FOPEN Function Opens an external file and returns a file identifier value.
FOPTNAME Function Returns the name of an item of information about an external file.
FOPTNUM Function Returns the number of information items, such as filename or record length, that are available for an external file.
FPOINT Function Positions the read pointer on the next record to be read.
FPOS Function Sets the position of the column pointer in the File Data Buffer (FDB).
FPUT Function Moves data to the File Data Buffer (FDB) of an external file, starting at the FDB's current column position.
FREAD Function Reads a record from an external file into the File Data Buffer (FDB).
FREWIND Function Positions the file pointer to the start of the file.
FRLEN Function Returns the size of the last record that was read, or, if the file is opened for output, returns the current record size.
FSEP Function Sets the token delimiters for the FGET function.
FWRITE Function Writes a record to an external file.
MOPEN Function Opens a file by directory ID and member name, and returns either the file identifier or a 0.
PATHNAME Function Returns the physical name of an external file or a SAS library, or returns a blank.
RENAME Function Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
SYSMSG Function Returns error or warning message text from processing the last data set or external file function.
SYSRC Function Returns a system error number.

 

Package SASFileIO - suggested methods

SAS File I/O ATTRC Function Returns the value of a character attribute for a SAS data set.
ATTRN Function Returns the value of a numeric attribute for a SAS data set.
CEXIST Function Verifies the existence of a SAS catalog or SAS catalog entry.
CLOSE Function Closes a SAS data set.
CUROBS Function Returns the observation number of the current observation.
DROPNOTE Function Deletes a note marker from a SAS data set or an external file.
DSNAME Function Returns the SAS data set name that is associated with a data set identifier.
ENVLEN Function Returns the length of an environment variable.
EXIST Function Verifies the existence of a SAS library member.
FCOPY Function Copies records from one fileref to another fileref, and returns a value that indicates whether the records were successfully copied.
FETCH Function Reads the next non-deleted observation from a SAS data set into the Data Set Data Vector (DDV).
FETCHOBS Function Reads a specified observation from a SAS data set into the Data Set Data Vector (DDV).
GETVARC Function Returns the value of a SAS data set character variable.
GETVARN Function Returns the value of a SAS data set numeric variable.
IORCMSG Function Returns a formatted error message for _IORC_.
LIBNAME Function Assigns or clears a libref for a SAS library.
LIBREF Function Verifies that a libref has been assigned.
NOTE Function Returns an observation ID for the current observation of a SAS data set.
OPEN Function Opens a SAS data set.
PATHNAME Function Returns the physical name of an external file or a SAS library, or returns a blank.
POINT Function Locates an observation that is identified by the NOTE function.
RENAME Function Renames a member of a SAS library, an entry in a SAS catalog, an external file, or a directory.
REWIND Function Positions the data set pointer at the beginning of a SAS data set.
SYSEXIST Function Returns a value that indicates whether an operating-environment variable exists in your environment.
SYSMSG Function Returns error or warning message text from processing the last data set or external file function.
SYSRC Function Returns a system error number.
VARFMT Function Returns the format that is assigned to a SAS data set variable.
VARINFMT Function Returns the informat that is assigned to a SAS data set variable.
VARLABEL Function Returns the label that is assigned to a SAS data set variable.
VARLEN Function Returns the length of a SAS data set variable.
VARNAME Function Returns the name of a SAS data set variable.
VARNUM Function Returns the number of a variable's position in a SAS data set.
VARTYPE Function Returns the data type of a SAS data set variable.

 

Roadmap

The same argument can be made for other functions (in other categories) that are not yet in the DS2 function space.  Add those functions in category like named packages.