From a CICS application i send a txt file in dir c:\my_dir\test.txt
my probem is when the job is finished...
How to be sure when the file is updatable or movable from dir to other dir???

How to be sure when the file is updatable or movable from dir to other dir???

what exactly do you wish to achieve by this?

what exactly do you wish to achieve by this?

In effect i want make a loop arrount the txt file and if the txt file is readable or writable i am sure the print job of CICS is finished...
I hope to understand me.
Sal.

you meant you want to check whether the file has any content in it or not? if it is a zero length file then you wish to abort the print job else you want to give confirmation?

is that so or anything else?
plz buddy make your post more clear so it can be understandable by those people who will afford to make replies against your post.

ok......
hv a nice day

you meant you want to check whether the file has any content in it or not? if it is a zero length file then you wish to abort the print job else you want to give confirmation?

is that so or anything else?
plz buddy make your post more clear so it can be understandable by those people who will afford to make replies against your post.

ok......
hv a nice day

..."you meant you want to check whether the file has any content in it or not? if it is a zero length file then you wish to abort the print job else you want to give confirmation?"

YES!!!! Perfect.
Sorry for my enghlish but i'm Italian from Napoli...

ok try this code.

Dim fl As Long, confirm As Integer, str As String, FNum As Integer

fl = FileLen("c:\aa.txt")
If fl = 0 Then
    MsgBox "zero length file."
Else
    confirm = MsgBox("Do you wish to print?", vbYesNo)
    If confirm = vbYes Then
        Text1.Text = ""
        FNum = FreeFile
        Open "c:\aa.txt" For Input As #1
            str = Input(LOF(FNum), #FNum)
        Close #FNum
        Text1.Text = str
        Printer.Print Text1.Text
        Printer.EndDoc
        MsgBox "Control passed to printer. Please verify.", vbInformation, "Print"
        End
    Else
        Exit Sub
    End If
End If

replace the Red marked portion with the physical location of the file that you wish to check and print.

plz let me know if this helps you to solve out ur problem.

regards
Shouvik

This article has been dead for over six months. Start a new discussion instead.