PreviousNext
Help > Development > W-Language Functions for AS/400 > Spool functions > ASCreateSpool > Example
Example


// redirects the REPORT_Report1 print into a prn file

iDestination(iFile, fTempPath()+"impr.prn")

iPrintReport(REPORT_Report1)

 

 

// example 1

IF NOT ASCreateSpool(fTempPath()+"impr.prn", cnxConnection,0, "QPGMR", "DOC0099", "Invoice XYZ") THEN

 Error(ErrorInfo(errFullDetails))  

END


// example 2

IF NOT ASCreateSpool(fTempPath()+"impr.prn", cnxConnection,ASsplHold+ASsplSave, "*CURRENT", "DOC0099", "Invoice XYZ",2, "MYSPOOL", "PRT_EAC", 1, "FRM01") THEN

 Error(ErrorInfo(errFullDetails))

END