Question44:
ThefollowingSASprogramissubmitted:
datawork.accounting;
setwork.dept1work.dept2;
jobcode=`FA1';
lengthjobcode$8;
run;
AcharactervariablenamedJOBCODEiscontainedinboththeWORK.DEPT1andWORK.DEPT2SASdatasets.
ThevariableJOBCODEhasalengthof5intheWORK.DEPT1datasetandalengthof7intheWORK.DEPT2dataset.
WhatisthelengthofthevariableJOBCODEintheoutputdataset?
1.3
2.Get all Questions and Answer from here
3.You need to have paid subscription to access all questions
4.Thanks for considering Python Certification Material
CorrectAnswer:2
Exp:The"setstatement"takesthelengthofthecommonvariable,asthelengthofthatvariableinthefirstdatasetofsetstatement.Thelengthofavariablealwaysdefine
automaticallyinthefirststatementandremainunchangedduringthewholeprogramuntilandunlessweredefineit.
SowhenDEPT1issetthelenghtwillsetto5andremainunchangedduringthedatastep,reasonislengthofthefirstplaceddataset'svariable'slengthwillbetaken,notthe
secondplaced.
You can access to full explanation to question and answer from this page.