stagedata.test.2.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief testing stagedata with format table
4 
5  <h4> SAS Macros </h4>
6  @li mx_testservice.sas
7  @li mp_assert.sas
8 
9 
10 **/
11 
12 %let _program=&appLoc/services/editors/stagedata;
13 
14 /**
15  * Test 1 - basic send
16  */
17 data work.sascontroltable;
18  action='LOAD';
19  MESSAGE='Testing upload of a format catalog';
20  LIBDS="DCTEST.DCFMTS-FC";
21 run;
22 
23 proc format lib=DCTEST.DCFMTS cntlout=work.fmtextract;
24 run;
25 data work.jsdata;
26  set work.fmtextract;
27  fmtrow=_n_;
28  if _n_<5 then _____DELETE__THIS__RECORD_____='Yes';
29  else _____DELETE__THIS__RECORD_____='No';
30  if _n_>20 then stop;
31 run;
32 
33 %mx_testservice(&_program,
34  viyacontext=&defaultcontext,
35  inputdatasets=work.sascontroltable work.jsdata,
36  outlib=web1,
37  mdebug=&sasjs_mdebug
38 )
39 
40 %let status=0;
41 data work.sasparams;
42  set web1.sasparams;
43  putlog (_all_)(=);
44  if status='SUCCESS' then call symputx('status',1);
45 run;
46 
47 %mp_assert(
48  iftrue=(&status=1),
49  desc=Checking successful submission of a format catalog table,
50  outds=work.test_results
51 )
52