943,929 Members | Top Members by Rank

Ad:
Feb 29th, 2008
0

know when print job is finished

Expand Post »
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???
Last edited by sal21; Feb 29th, 2008 at 5:12 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sal21 is offline Offline
22 posts
since Feb 2008
Mar 1st, 2008
0

Re: know when print job is finished

Click to Expand / Collapse  Quote originally posted by sal21 ...
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?
Reputation Points: 30
Solved Threads: 49
Posting Pro
choudhuryshouvi is offline Offline
553 posts
since May 2007
Mar 1st, 2008
0

Re: know when print job is finished

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.
Last edited by sal21; Mar 1st, 2008 at 7:03 am.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sal21 is offline Offline
22 posts
since Feb 2008
Mar 2nd, 2008
0

Re: know when print job is finished

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
Reputation Points: 30
Solved Threads: 49
Posting Pro
choudhuryshouvi is offline Offline
553 posts
since May 2007
Mar 2nd, 2008
0

Re: know when print job is finished

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...
Reputation Points: 10
Solved Threads: 0
Newbie Poster
sal21 is offline Offline
22 posts
since Feb 2008
Mar 3rd, 2008
0

Re: know when print job is finished

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
Reputation Points: 30
Solved Threads: 49
Posting Pro
choudhuryshouvi is offline Offline
553 posts
since May 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: invalid data source error in my thesis project
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Open a form by variable





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC