>100 Views
November 27, 26
スライド概要
SAS言語を中心として,解析業務担当者・プログラマなのコミュニティを活性化したいです
sas_dataset_json CDISC COSA Splotlight Q3 2025 Yutaka Morioka EPS corporation.
Speaker Yutaka Morioka Title: SAS Guru Organization: EPS Corporation A SAS programmer based in Japan. Besides my work as a clinical data scientist, actively engaging in disseminating various SAS programming techniques from introductory level to advanced. Working as an organizer of the SAS User's Group in Japan.
Brief Introduction to Dataset-JSON.
Limitations & Problems of XPT The SAS® Version 5 (V5) transport file format is an open standard developed by SAS to support data transfers between systems, especially those running different operating systems." SAS V5, being an open standard, allowed FDA to specify it as the standard required for data submission (Source:A Short History of CDISC and SAS Transport Files) But nearly 25 years have passed since then! CDISC 2024 Japan Interchange | #ClearDataClearImpact 4
Limitations & Problems of XPT Limitations ・Variable names are limited to a maximum length of 8 byte. ・Variable labels are limited to a maximum length of 40 byte. ・Character variable data are limited to a maximum length of 200 byte. ・Cannot have Encoding information. ・Only ASCII characters can be used, Numeric type is Integer or double only. etc. 5
Nice to meet Dataset-JSON. https://www.cdisc.org/standards/dataexchange/dataset-json/dataset-json-v1-1 6
sas_dataset_json Package
https://cosa.cdisc.org/ 8
9
%m_sas_to_json1_1 Exports a SAS dataset to Dataset-JSON v 1.1 %m_json1_1_to_sas Imports a dataset-JSON v1.1 into a SAS dataset %m_sas_to_ndjson1_1 Exports a SAS dataset to NDJSON (Representation of DatasetJSON) format (version 1.1). %m_ndjson1_1_to_sas Imports a NDJSON (Representation of Dataset-JSON) format (version 1.1) into SAS dataset. 10
https://github.com/Morioka-Yutaka/sas_dataset_json 11
12
Example Usage:- [case 1] default, simple use %m_sas_to_json1_1( outpath =/project/json_out, library = adam, dataset = adsl, pretty = Y ); 13
Example Usage:- [case 1] default, simple use %m_sas_to_json1_1( outpath =/project/json_out, library = adam, dataset = adsl, pretty = N ); 14
Example Usage:- [case 2] setting dataset-level metadata %m_sas_to_json1_1( outpath=&outpath., library=WORK, dataset=AE, pretty=Y, originator=ABC Pharma, fileOID=http://example.org/studyXYZ/define, studyOID=XYZ-123, metaDataVersionOID=MDV.XYZ.1.0, sourceSystem_name=SAS 9.4, sourceSystem_version=9.4M7 ); VDE dataset viewer 15
Example Usage: - [case 3] set metadata by SAS extended attribute proc datasets nolist; modify adsl; xattr add ds originator="X corp." fileOID="www.cdisc.org/StudyMSGv2/1/Define-XML_2.1.0/2024-11-11/" studyOID="XX001-001" metaDataVersionOID="MDV.MSGv2.0.SDTMIG.3.4.SDTM.2.0" sourceSystem_name="SASxxxx" sourceSystem_version="9.4xxxx" ; xattr add var STUDYID (label="Study Identifier" dataType="string" length=8 keySequence=1) USUBJID (label="Unique Subject Identifier" dataType="string" length=7 keySequence=2) RFSTDTC (label="Subject Reference Start Date/Time" dataType="date") AGE (label="Age" dataType="integer" length=2) TRTSDT (label="Date of First Exposure to Treatment" dataType="date" targetDataType="integer" displayFormat="E8601DA.") ; ; run; quit; %m_sas_to_json1_1( outpath = /project/json_out, library = WORK, dataset = adsl, pretty = Y); 16
17
SAS Extended Attributes SAS Dataset JSON Need a receptacle for data leaked by conversion 18
SAS Extended Attributes Starting with SAS 9.4, it is possible to set extended attributes that can be defined freely and arbitrarily by the user for a dataset or each variable. Extended attributes consist of a name/value pair, and the value can be of either a numeric or character type. The sas7bxat is associated with the dataset body and has extended meta information. 19
The Concept of sas_datset_json The key feature of this package is that it supplements metadata lacking in SAS datasets with extended attributes during the conversion between SAS datasets and Dataset-JSON. Extended Attribute SAS Dataset Dataset-JSON Metadata Data CDISC 2024 Japan Interchange | #ClearDataClearImpact 20
21
Example Usage: SAS Dataset with Extended Attribute %m_json1_1_to_sas( inpath=/data/definejson, ds=ADSL); 22
%m_sas_to_ndjson1_1( outpath =/project/json_out, library = adam, dataset = adsl, ); 23
24
Foundations and Surrounding Context of the Package
https://github.com/yabwon/SAS_PACKAGES CDISC 2024 Japan Interchange | #ClearDataClearImpact 26
https://github.com/PharmaForest https://pharmaforest.github.io/ 27
https://github.com/PharmaForest/xattr_kit 28
29
30
In Japan, awareness of Dataset-JSON is still limited, partly because the PMDA has not yet provided much guidance on it. In addition, many tools and programs developed in the US and Europe do not work well in Japanese computing environments. For this reason, our package is designed to run in SAS under Japanese regional settings and can handle datasets containing Japanese characters. We also provide explanatory materials in Japanese, tailored for Japanese users. 31
Conclusion
Signature features of my package ・ The package is implemented entirely in 100% SAS code. ・ It leverages SAS extended attributes for managing and transforming metadata. ・ It is built using the SAS package framework, making it easy to share and distribute. ・ It is integrated into the PharmaForest ecosystem. ・ It is designed with the Japanese environment in mind and is also used to promote awareness and adoption within Japan. 33
Things I Aim to Do Next ・ Dataset-JSON Structural Validation and Checks ・ Importing and Applying Metadata from Define.xml ・ Support for Creating Compressed Dataset-JSON ・ Developing seamless integration for validating generated Dataset-JSON with CDISC CORE from SAS 34
The above kanji is a motto of a professional Shogi (Japanese chess) player,meaning “Always try a new move.” 35
Thank you for your attention. Linkdin github (My Repositories) PharmaForest Email [email protected] [email protected] 36