View previous topic :: View next topic
|
Author |
Message |
ch.prashant
New User
Joined: 16 Sep 2006 Posts: 27 Location: Hyderabad
|
|
|
|
How to display S9(4)V9(5) COMP-3
I used S9(4)V9(5) in my p/p variable but am facing S0C7 abend.
I want to display the input variable S9(4)V9(5) COMP-3
so suggest me the pic clause to be given for my o/p variable. |
|
Back to top |
|
|
Binop B
Active User
Joined: 18 Jun 2009 Posts: 407 Location: Nashville, TN
|
|
|
|
Hi Prashant,
You could redefine the field as characters and display/write to see the content. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
The S0C7 implies invalid data in the field (as long as the S0C7 is occurring on your DISPLAY) -- either redefine as PIC X and display that, or do an IF NUMERIC test before your display and use an ELSE to display an invalid data message. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you could implement Binop's excellent suggestion:
Code: |
IF comp-3_field NUMERIC
THEN
DISPLAY comp-3_field_redefined_as_x-type record_counter
END-IF
|
then you would only be displaying the non-numeric fields instead of every record.
There is also a way to do it with DFSORT (search the DFSORT forum),
then you would not need to modify your program. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
whoops,
I have yet again made a post duplicating that of Robert.
sorry. |
|
Back to top |
|
|
|