View previous topic :: View next topic
|
Author |
Message |
Abi
New User
Joined: 27 Jul 2005 Posts: 35 Location: Chennai
|
|
|
|
Hi,
I want some messages to be displayed in SYSPRINT & Some in SYSOUT...Is that possible... if yes ...then how ?
This was asked in an interview. |
|
Back to top |
|
|
jon_s_rice
Active User
Joined: 24 Mar 2005 Posts: 102 Location: Douglasville, GA USA
|
|
|
|
Assuming you are using COBOL. A message will go to SYSOUT as a result of a DISPLAY statement. This can be changed in a compile option. To display to SYSPRINT it would have to be defined as a file. |
|
Back to top |
|
|
karthik1680 Warnings : 2 New User
Joined: 14 May 2005 Posts: 64 Location: chennai
|
|
|
|
hi jon_s_rice,
could explain detaily plz? |
|
Back to top |
|
|
jon_s_rice
Active User
Joined: 24 Mar 2005 Posts: 102 Location: Douglasville, GA USA
|
|
|
|
In your COBOL program.
Code: |
SELECT PRINTER-FILE
ASSIGN TO S-SYSPRINT.
....
FD PRINTER-FILE
RECORD CONTAINS 133 CHARACTERS.
01 PRINTER-FILE-RECORD PIC X(133) JUSTIFIED RIGHT.
in the procedure division
for SYSPRINT
WRITE PRINTER-FILE-RECORD AFTER ADVANCING 1 LINE.
for SYSOUT
DISPLAY 'GREATER THAN KEY ',
|
|
|
Back to top |
|
|
Abi
New User
Joined: 27 Jul 2005 Posts: 35 Location: Chennai
|
|
|
|
Hi jon_s_rice,
Thanks for the info |
|
Back to top |
|
|
|