Prijava na forum:
Ime:
Lozinka:
Prijavi me trajno:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:

ConQUIZtador
Trenutno vreme je: 20. Apr 2024, 00:40:56
nazadnapred
Korisnici koji su trenutno na forumu 0 članova i 1 gost pregledaju ovu temu.

 Napomena: Za sva pitanja u vezi kupovine novog hardware-a ili procene vrednosti i preporuke koristite - ovu temu

Spyware,sta je,kako radi,kako se zastititi? :: Kako rade mreze :: Burek Anti-virus software review :: Index tema koje ne treba propustiti

Idi dole
Stranice:
1  Sve
Počni novu temu Nova anketa Odgovor Štampaj Dodaj temu u favorite Pogledajte svoje poruke u temi
Tema: stampa iz dos-a kroz windows  (Pročitano 8881 puta)
Prijatelj foruma
Zvezda u usponu


Zodijak
Pol Muškarac
Poruke 2178
OS
Windows 2000
Browser
Opera 8.01
mob
Nokia N85
Printing from Cobol Programs

Please carefully read pages 707-708 in Appendix B of your text book. This will provide information about generating printed output from your Cobol programs.

In a mainframe environment it would be fairly easy to provide specific directions about printed output. However, we are for the most part using home PCs and, therefore, do not enjoy the luxury of a standard operating environment as we would on a mainframe.
Attached Printers

As indicated in your text, personal computers have output ports to which peripheral devices, such as printers, can be attached. Commonly, the LPT1 port is used for your printer. Using "ASSIGN TO PRINTER" in the SELECT statment may, depending on the configuration of your PC, direct output to your printer.

       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT OUT-FILE
               ASSIGN TO PRINTER.

Your textbook also suggests "ASSIGN TO 'LPT1:' as equivalent.
Network Printers

Keeping in mind that the Micro Focus Cobol software we are using is actually a DOS/Windows 3.1 application (rather than Windows 95/98), it should not come as a surprise that the software does not support the newer Windows print spooling capability. If your printer is on a network with your PC rather than being directly attached to an output port on your PC the "ASSIGN TO PRINTER" method will not work unless you can find out how to associate a port name on your PC with a network printer.

Your text book suggests the use of the NET USE command which you enter at the DOS prompt. To get the DOS prompt click on your Start button, point to Programs and then to MS-DOS Prompt. You will need to enter a NET USE command something like: NET USE LPT1: \\computer\printer

You will need to replace \\computer\printer with the path to the specific network printer you want to use. To find that path try clicking on your Start button and pointing to Settings and then Printers. When the Printers window opens, right-click on your printer and select Properties from the pop-up menu. In the Properties window click on the Details tab and use the path found in the box labeled "Print to the following port". Click Cancel to close the Properties window.
Output to Disk File

An alternative to sending your program's output directly to a printer is sending it to a disk file which can then be printed later using any software application that is capable of printing text files.

       ENVIRONMENT DIVISION.
       INPUT-OUTPUT SECTION.
       FILE-CONTROL.
           SELECT OUT-FILE
               ASSIGN TO 'A:\REPORT.TXT'
               ORGANIZATION IS LINE SEQUENTIAL.

Creating printed output in this way is therefore a two-step process: (1) you run your Cobol program to create an output file on disk, and (2) you open and print that disk file from some other application.

The application mentioned in your text book is Notepad. Notepad is a standard utility provided with Windows. Most personal computers are configured with Notepad as the standard text editing application. To open Notepad point to the Start button, then to Programs, then to Accessories, then to Notepad. Be aware, however, that Notepad does have some limitations and there are other alternatives.

One of the problems with writing your output to a text file instead of directly to the printer is that Notepad and other text editors do not always handle the control characters inserted into the file when you use Cobol statements such as:

            WRITE PRINT-LINE AFTER ADVANCING PAGE.

The examples below show two paragraphs which should create the same output. But, the two output files look quite different when opened with Notepad.
HELLO6.CBL    HELLO6X.CBL    

PRINT-FOOTERS.
    MOVE SPACES TO OUT-RECORD.
    WRITE OUT-RECORD.
    MOVE THE-COUNT TO FOOTER-COUNT.
    MOVE FOOTER-LINE TO OUT-RECORD.
    WRITE OUT-RECORD.

PRINT-FOOTERS.
    MOVE THE-COUNT TO FOOTER-COUNT.
    MOVE FOOTER-LINE TO OUT-RECORD.
    WRITE OUT-RECORD AFTER 2.
       

The best method for producing printed output will likely vary from one student to another. The instructor is aware that this is a limitation of our software environment which will require some degree of flexibility.
IP sačuvana
social share




Ne koristi "kaps".Koristi "bold" kada hoćes nešto da naglasis.
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Zvezda u usponu


Juzna pruga,Stara skola...

Zodijak Scorpio
Pol Muškarac
Poruke 1532
Zastava Srbija
OS
Windows XP
Browser
Opera 8.52
mob
Samsung J6
ok hvala a kako to isto ali preko usb-a
IP sačuvana
social share
ride till your legs go numb...
Pogledaj profil WWW GTalk Skype Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Zvezda u usponu


Juzna pruga,Stara skola...

Zodijak Scorpio
Pol Muškarac
Poruke 1532
Zastava Srbija
OS
Windows XP
Browser
Opera 8.52
mob
Samsung J6
na srpskom
IP sačuvana
social share
ride till your legs go numb...
Pogledaj profil WWW GTalk Skype Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Prijatelj foruma
Zvezda u usponu


Zodijak
Pol Muškarac
Poruke 2178
OS
Windows 2000
Browser
Mozilla Firefox 1.0.7
mob
Nokia N85
Mislim da stampa iz Cobola nece moci na USB printeru (mreznom)  Smile .Svaki printer ima i LPT i USB varijantu tako da te nista ne kosta da "zakacis" printer na LPT port  Smile.
IP sačuvana
social share




Ne koristi "kaps".Koristi "bold" kada hoćes nešto da naglasis.
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Zvezda u usponu


Juzna pruga,Stara skola...

Zodijak Scorpio
Pol Muškarac
Poruke 1532
Zastava Srbija
OS
Windows XP
Browser
Opera 8.50
mob
Samsung J6
to sam i mislio a povesan je u mrezi
IP sačuvana
social share
ride till your legs go numb...
Pogledaj profil WWW GTalk Skype Facebook
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Pocetnik

Zodijak
Pol
Poruke 15
OS
Windows XP
Browser
Internet Explorer 6.0
Ako ti treba resenje za stampu iz DOS aplikacija na USB ili bilo koji lokalni ili mrezni stampac javi se na [kill].
« Poslednja izmena: 28. Okt 2006, 10:55:06 od enaB »
IP sačuvana
social share
Pogledaj profil
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Moderator
Krajnje beznadezan


Ko zadnji, ćelava mu keva!

Zodijak Aries
Pol Muškarac
Poruke 13104
Zastava Batajnica
OS
Windows XP
Browser
Opera 8.54
mob
Samsung SGH-E630
Teme starije od 6 mesece ne treba "oživljavati"

[lock]
IP sačuvana
social share
                                       
enaB <=> Bane, "Ena" nije moje ime                    f -1(Smile)= Smiley

Don't watch it, because we all know that a watched pot does not boil, and watched cake does not bake.
Pogledaj profil WWW
 
Prijava na forum:
Ime:
Lozinka:
Zelim biti prijavljen:
Trajanje:
Registruj nalog:
Ime:
Lozinka:
Ponovi Lozinku:
E-mail:
Idi gore
Stranice:
1  Sve
Počni novu temu Nova anketa Odgovor Štampaj Dodaj temu u favorite Pogledajte svoje poruke u temi
Trenutno vreme je: 20. Apr 2024, 00:40:56
nazadnapred
Prebaci se na:  
Upozorenje:ova tema je zaključana!
Samo administratori i moderatori mogu odgovoriti.
web design

Forum Info: Banneri Foruma :: Burek Toolbar :: Burek Prodavnica :: Burek Quiz :: Najcesca pitanja :: Tim Foruma :: Prijava zloupotrebe

Izvori vesti: Blic :: Wikipedia :: Mondo :: Press :: Naša mreža :: Sportska Centrala :: Glas Javnosti :: Kurir :: Mikro :: B92 Sport :: RTS :: Danas

Prijatelji foruma: Triviador :: Domaci :: Morazzia :: TotalCar :: FTW.rs :: MojaPijaca :: Pojacalo :: 011info :: Burgos :: Alfaprevod

Pravne Informacije: Pravilnik Foruma :: Politika privatnosti :: Uslovi koriscenja :: O nama :: Marketing :: Kontakt :: Sitemap

All content on this website is property of "Burek.com" and, as such, they may not be used on other websites without written permission.

Copyright © 2002- "Burek.com", all rights reserved. Performance: 0.076 sec za 16 q. Powered by: SMF. © 2005, Simple Machines LLC.