Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

conversion of computational data to normal form

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Dec 06, 2005 9:28 pm    Post subject: conversion of computational data to normal form
Reply with quote

Hi All,

I have got a requirment,

i will file from external system, in which part of the data represents date, and it is in internal form (i.e s9(4) comp) , now i need to convert that from computational form to normal display form before processing.

please let me know thanks in advance

regards
jayaram
Back to top
View user's profile Send private message

DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Dec 06, 2005 9:39 pm    Post subject: Re: conversion of computational data to normal form
Reply with quote

Please let us know what the date format is in the comp field, wnd what the format is that you want in display form.

Thanks,
Back to top
View user's profile Send private message
rajandhla

Active User


Joined: 18 Oct 2005
Posts: 182
Location: Luton UK

PostPosted: Tue Dec 06, 2005 9:56 pm    Post subject: Re: conversion of computational data to normal form
Reply with quote

DavidatK wrote:
Please let us know what the date format is in the comp field, wnd what the format is that you want in display form.

Thanks,


date is in internal form for 26jul05 it stores as D2CF, and the output required format is ccyy-mm-dd. please let me know .

thanks
jai
Back to top
View user's profile Send private message
krishnaiahc

New User


Joined: 31 Aug 2005
Posts: 21

PostPosted: Tue Dec 06, 2005 10:30 pm    Post subject:
Reply with quote

Hai,

Date will come at least 6 digits (yymmdd). 6 charaters are not fit into S9(4) comp.

I think it may 1 word, ie s9(9) comp. If yes you have to follow below process:

1. find out which date format is coming (YYYYMMDD/YYMMDD)
2. According define the variable with numeric data item pic (i.e s9(8) /s9(6) ) move internal form to numeric data item.
3. for Example YYYYMMDD, Defind the working storange Non-numeric variable with length of numeric data + 2 ( YYYY-MM-DD).

4. the above Non-numeric data defination need to be

05 DATA-DISP
10 YEAR PIC X(4).
10 FILLER PIC X(1).
10 MONTH PIC X(2).
10 FILLER PIC X(1).
10 DATE PIC X(2).
MOVE CORRESPONDING FILELD TO NON-NUMERIC DATA ITEM.

Please let me know if you have any issue.

thanks,
Krishna
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Dec 06, 2005 11:22 pm    Post subject: Re: conversion of computational data to normal form
Reply with quote

Jai,
I still have some confusion of the comp date format. When the hex value x?D2CF? is converted to decimal it is 53967. This doesn?t represent anything to me. icon_confused.gif

Can you please elaborate on the format and how you get 26jul05 from this?

Is it truly a 9(4) COMP (2 bytes) or a 9(8) COMP (4 bytes).

Let us know,


Thanks,
icon_smile.gif
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Wed Dec 07, 2005 4:54 am    Post subject:
Reply with quote

Jai,

The max number you can store in a 9(4) comp field is 65535. If it's S9(4) the max nbr is 32767 because the hi order bit is reserved for the sign.

You'll have to go with 9(6) comp. That requires 4 bytes of memory. What's the size of the field being sent?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us