IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Display some messages in SYSOUT and SYSPRINT


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Abi

New User


Joined: 27 Jul 2005
Posts: 35
Location: Chennai

PostPosted: Tue Nov 29, 2005 5:24 pm
Reply with quote

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. icon_rolleyes.gif
Back to top
View user's profile Send private message
jon_s_rice

Active User


Joined: 24 Mar 2005
Posts: 102
Location: Douglasville, GA USA

PostPosted: Tue Nov 29, 2005 5:49 pm
Reply with quote

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
View user's profile Send private message
karthik1680
Warnings : 2

New User


Joined: 14 May 2005
Posts: 64
Location: chennai

PostPosted: Wed Nov 30, 2005 7:26 am
Reply with quote

hi jon_s_rice,
could explain detaily plz?
Back to top
View user's profile Send private message
jon_s_rice

Active User


Joined: 24 Mar 2005
Posts: 102
Location: Douglasville, GA USA

PostPosted: Wed Nov 30, 2005 8:41 am
Reply with quote

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
View user's profile Send private message
Abi

New User


Joined: 27 Jul 2005
Posts: 35
Location: Chennai

PostPosted: Thu Dec 01, 2005 12:17 pm
Reply with quote

Hi jon_s_rice,
Thanks for the info
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Passing SYSPRINT to Invoked Program PL/I & Assembler 9
No new posts Copy few lines from SYSOUT of 10 mill... All Other Mainframe Topics 5
No new posts How to display the leading zeros of a... DB2 7
No new posts REXX GETMSG does not return £HASP880... CLIST & REXX 2
No new posts No sysout coming in spool JCL & VSAM 4
Search our Forums:

Back to Top