#include <qiofun.h>
#include <cx.h>
#define LUN 4
#define EFN 4
main(argc,argv) char **argv;
{int nes;
 int isb[2];
 int noast;
 int prl[6];
 char c1; char c2; char c3;
 int dnam;
 int unit;
 int dsw;
 noast=0;
 sscanf(argv[1],"%c%c%c",&c1,&c2,&c3);
 c1=toupper(c1);
 c2=toupper(c2);
 c3=toupper(c3);
 dnam=c2<<8 | c1;
 unit = c3?c3-'0':0;
 dsw=alun(LUN,dnam,unit);
 if	(dsw!=IS_SUC)
	{printf("\7Can't attach to %c%c%o: dsw=%o\n",c1,c2,unit,dsw);
	 exit();
	}
 ;
 sscanf(argv[2],"%d",&nes);
 prl[0]=nes;
 dsw=qiow(IO_SPF,LUN,EFN,isb,noast,prl);
 if	(dsw!=IS_SUC)
	{printf("\7dsw=%o isb0=%o isb1=%o\n",dsw,isb[0],isb[1]);
	 exit();
	}
 ;
}
