An example of JCL: 1 //PKTEST JOB 123456 2 // EXEC SAS 3 //SYSIN DD * 4 libname master 'tso.pk.master'; 5 data master.select; 6 set master.prod; 7 where region='2'; 8 totexp=sum(of exp1-exp12); ************************************************ * Method for checking/establishing link to MVS * * from a non FRAME environment * ************************************************; mainbat: method OK_arg 8 / resident; /* set appropriate options */ rc=optsetc('remote','A'); rc=optsetc('comamid','ehllapi'); if rlink('A') then /* Link exists */ OK_arg=1; else do; /* Link doesn't exist */ submit continue; /* Establish link */ signon; endsubmit; OK_arg=rlink('A'); /* set returncode: 0=failed 1=success */ end; endmethod; Then create an entry BATCHJOB.SCL in the SASUSER.BATCHJOB catalog with the following code: ***************************************************************** * This program submits a batchjob via Internal Reader * *****************************************************************; init: call method('methods.scl','mainbat',returncode); if returncode=0 then do; /* unsuccessfull SIGNON */ put 'ERROR: Unable to establish connection'; put 'Start your whatever 3270 emulator first. Then try again!'; return; end; else do; /* successfull SIGNON */ ********************************************************** * Clear the PREVIEW-Window and copy in the batchjob * * from entry SASUSER.PROFILE.BATCHJOB.SOURCE. * * * * Then save batchjob as a flat textfile. * **********************************************************; rc=preview('clear'); rc=preview('copy','sasuser.profile.batchjob.source'); rc=filename('pgmbin','c:\temp\batchjob.txt'); rc=preview('file','pgmbin'); rc=preview('clear'); /* Upload file into Internal Reader */ submit continue remote; options nonotes nosource; filename intread SYSOUT=A pgm=intrdr recfm=fb lrecl=80; proc upload infile='c:\temp\batchjob.txt' outfile=intread status=no; run; options notes source; endsubmit; rc=fdelete('pgmbin'); /* delete the file */ rc=filename('pgmbin',' '); /* clear filref */ put 'NOTE: Batchjob was submitted!'; end; return; Another workaround here could be to fill an SCL list with the contents of the SOURCE entry (FILLIST function) and then save the SCL list as a flat file (SAVELIST), like the following: joblist=makelist(); rc=fillist('catalog(stripcc)','sasuser.profile.batchjob.source', joblist); rc=savelist('file(stripcc)','c:\temp\batchjob.txt',joblist); rc=dellist(joblist);