know when print job is finished

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 20
Reputation: sal21 is an unknown quantity at this point 
Solved Threads: 0
sal21 sal21 is offline Offline
Newbie Poster

know when print job is finished

 
0
  #1
Feb 29th, 2008
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.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: know when print job is finished

 
0
  #2
Mar 1st, 2008
Originally Posted by sal21 View Post
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?
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 20
Reputation: sal21 is an unknown quantity at this point 
Solved Threads: 0
sal21 sal21 is offline Offline
Newbie Poster

Re: know when print job is finished

 
0
  #3
Mar 1st, 2008
Originally Posted by choudhuryshouvi View Post
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.
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: know when print job is finished

 
0
  #4
Mar 2nd, 2008
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
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 20
Reputation: sal21 is an unknown quantity at this point 
Solved Threads: 0
sal21 sal21 is offline Offline
Newbie Poster

Re: know when print job is finished

 
0
  #5
Mar 2nd, 2008
Originally Posted by choudhuryshouvi View Post
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...
Reply With Quote Quick reply to this message  
Join Date: May 2007
Posts: 537
Reputation: choudhuryshouvi is an unknown quantity at this point 
Solved Threads: 49
choudhuryshouvi's Avatar
choudhuryshouvi choudhuryshouvi is offline Offline
Posting Pro

Re: know when print job is finished

 
0
  #6
Mar 3rd, 2008
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
Shouvik_The_Expert_Coder
Have a problem? Don't worry just give me a call and I'll fix it for you.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC