Asumin i send a job of print from a CICS application directly to lpt1 (i have set the printer Generic Text) and have this result (see the attached file) is possible to caputure the job and import withoth save in a dir the job of print?
http:\\
www.gssitaly.com\t8327.zip
in effect i use this macro to import the saved file:
'T8327 INPS
Sub CercaTrova()
Dim riga As String
Dim cont As Integer
cont = 4
FASE = 0
sott_int = 0
Dim Vfile
Vfile = Application.GetOpenFilename
Open Vfile For Input As #1
While Not EOF(1)
Line Input #1, riga
If Len(Trim(riga)) > 0 Then
If InStr(Mid(riga, 10, 9), "SPORTELLO") > 0 Then
var_DIP = Mid(riga, 22, 4)
FASE = 1
End If
If InStr(Mid(riga, 103, 1), ",") > 0 Then
var_SEDE = Mid(riga, 7, 4)
var_CAT = Mid(riga, 20, 3)
var_CERT = Mid(riga, 32, 8)
var_RATA = Mid(riga, 64, 2)
var_ANNO = Mid(riga, 70, 4)
var_IMPORTO = Mid(riga, 91, 15)
var_CC = Mid(riga, 125, 6)
FASE = 2
End If
If FASE = 2 Then
Foglio1.Range("A" & Trim(Str(cont))).Value = var_DIP
Foglio1.Range("B" & Trim(Str(cont))).Value = var_SEDE
Foglio1.Range("C" & Trim(Str(cont))).Value = var_CAT
Foglio1.Range("D" & Trim(Str(cont))).Value = var_CERT
Foglio1.Range("E" & Trim(Str(cont))).Value = var_RATA & "/" & var_ANNO
Foglio1.Range("F" & Trim(Str(cont))).Value = var_IMPORTO
Foglio1.Range("G" & Trim(Str(cont))).Value = var_CC
FASE = 0
cont = cont + 1
End If
End If
Wend
Close #1
MsgBox ("MACRO TERMINATA!")
End Sub