1 / 6

Generate ATTRIB and FORMAT Statements from the SAP By: Shafi Chowdhury

PhUSE 2010 Berlin. Generate ATTRIB and FORMAT Statements from the SAP By: Shafi Chowdhury. Creating an ATTRIB Statement. Variable,Label,Data Type,Length,Format,Example,Comments STUDY,Trial number,Char,9,$9.,1000_0001,Study number as it appears in the raw data

Download Presentation

Generate ATTRIB and FORMAT Statements from the SAP By: Shafi Chowdhury

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PhUSE 2010 Berlin Generate ATTRIB and FORMAT Statements from the SAPBy: Shafi Chowdhury

  2. Creating an ATTRIB Statement Variable,Label,Data Type,Length,Format,Example,Comments STUDY,Trial number,Char,9,$9.,1000_0001,Study number as it appears in the raw data PTNO,Patient number,Num,8,10,1201,Patient number as it appears in the raw data INVSITE,Site,Char,10,$10.,SITE1201,Site Code POPU,Population,Char,16,$16.,FAS,Patient set being analysed (definition in the core SAP): FAS=Full Analysis Set POPUNY,Patient in the population,Num,8,Yesnofmt.,1,"1=Yes, 0=No" %x_attrib (PATH = C:\Secure_data\PhUse_2010_Berlin, CSV_FILE = attrib.csv); ATTRIB study FORMAT = $9. LABEL = "Trial number" ptno FORMAT = 10. LABEL = "Patient number" invsite FORMAT = $10. LABEL = "Site" popu FORMAT = $16. LABEL = "Population" popuny FORMAT = Yesnofmt. LABEL = "Patient in the population" ;

  3. Creating an ATTRIB Statement • Copy the table from the SAP and paste it into Excel • Save the Excel file as a .csv file • Define the path and the file name in the X_ATTRIB macro call • Submit the macro and macro call • The ATTRIB statement is written in the LOG

  4. Creating a FORMAT Statement PROC FORMAT; VALUE agegrpdc 1 = "<=50 years" 2 = ">50 - <=60 years" 3 = ">60 - <=70 years" 4 = ">70 - <=80 years" 5 = ">80 years" ; VALUE alccddc 0 = "Non drinker" 1 = "Avg. consumption" 2 = "Exc. consumption" ; VALUE $popudc "ENROL" = "Enrolled set" "RAND" = "Randomised set" "TS" = "Treated set" "FAS" = "Full analysis set" ; RUN; AGEGRPDC,1,<=50 years ,2,>50 - <=60 years ,3,>60 - <=70 years ,4,>70 - <=80 years ,5,>80 years ALCCDDC,0,Non drinker ,1,Avg. consumption ,2,Exc. consumption POPUDC,ENROL,Enrolled set ,RAND,Randomised set ,TS,Treated set ,FAS,Full analysis set %x_format(PATH = C:\Secure_data\PhUse_2010_Berlin, CSV_FILE = formats.csv);

  5. Creating a FORMAT Statement • Copy the table from the SAP and paste it into Excel • Save the Excel file as a .csv file • Define the path and the file name in the X_FORMAT macro call • Submit the macro and macro call • The FORMAT statement is written in the LOG

  6. Questions or Comments ? ? ? Shafi Chowdhury M.Sc. Shafi@shaficonsultancy.com www.shaficonsultancy.com

More Related