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

Find the actual value of a field which is S9(06)V99 COMP-3


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ezhil Murugan

New User


Joined: 10 Jul 2008
Posts: 14
Location: Chennai

PostPosted: Thu Aug 07, 2008 9:06 pm
Reply with quote

I've a field in my output file . The type of the field is S9(06)V99 COMP-3
and it's in un-readable format in the output file. Could you please let me know the way to find the actual numeric value of that FIELD?
Back to top
View user's profile Send private message
rag swain

New User


Joined: 17 Dec 2007
Posts: 33
Location: pune,INDIA

PostPosted: Thu Aug 07, 2008 9:35 pm
Reply with quote

If you have a copybook to map with, you can see the value in Nsync/FileAid. Otherwise if you want it to be in display format you can code in your program
Code:


02 WS-FLD1 PIC S9(06)V99 COMP-3.

02 WS-FLD2 S9(06)V99.

IF WS-FLD1 IS NUMERIC
    MOVE WS-FLD1 TO WS-FLD2
ELSE
    call abend routine/do your stuff to keep the record away from processing
END-IF

Back to top
View user's profile Send private message
rpuhlman

New User


Joined: 11 Jun 2007
Posts: 80
Location: Columbus, Ohio

PostPosted: Thu Aug 07, 2008 9:54 pm
Reply with quote

Hi Ezhil,

If you just want to look, go to option 3.4 in TSO/ISPF, type in your dataset name and press enter. Place a 'b' beside the dataset and press enter. At the command line, type in 'hex'. Locate the starting position of your COMP-3 field ...

Ex:
Code:
 -----------------
E1005001    .....
CFFFFFFF4444000004
5100500100000000C0
 -----------------


In this case, the starting position is 13 and ending is 17. If you still have trouble, holler back.

Rick
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 -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Find the size of a PS file before rea... COBOL Programming 13
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Join 2 files according to one key field. JCL & VSAM 3
Search our Forums:

Back to Top