MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Need validation on this ...

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
visa
Beginner


Joined: 12 Sep 2006
Posts: 6
Topics: 5

PostPosted: Tue Feb 27, 2007 10:06 am    Post subject: Need validation on this ... Reply with quote

Hi all,i have to convert some hex variables present in a sequnetial file to normal values.....the copybook of the sequential file is like this...

01 td-total-accountnumber
05 td-co-no pic s9(05) comp-3.
05 td-branch pic s9(05) comp-3.
05 td-accno pic s9(11) comp-3.

I have written a cobol program where i'm reading this sequential file and moving this comp-3 values to the working-storage varaibles.I have declared the working-storage variables like this....

01 ws-co pic x(06)
01 ws-branch pic x(06)
01 ws-accno pic x(12)

After submitting my job, i'm getting wrong values in ws-co,ws-branch,ws-accno.I feel I have declared working storage varaibles wrongly.

Please validate the above variable declarations......(i cant give the screen shots of the input and output values as im working in client's machine..sorry)
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Tue Feb 27, 2007 10:17 am    Post subject: Reply with quote

visa,

Please search before posting. A simple search for "HEX CHARACTER" yielded the following.

http://www.mvsforums.com/helpboards/viewtopic.php?t=2564&highlight=hex+character

http://www.mvsforums.com/helpboards/viewtopic.php?t=2351&highlight=hex+character

http://www.mvsforums.com/helpboards/viewtopic.php?t=2592&highlight=hex+character

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Tue Feb 27, 2007 10:17 am    Post subject: Reply with quote

I think if you search the forum you will find that you cannot go directly from packed decimal to character but have to go via unpacked eg S9(5). If, on the other hand, they are not really packed numbers - just hex data then character fields can hold anything from x'00' to x'ff' assigning no special meaning to the value so you could read the data straight into the character field.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group