Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 3270 Data stream error Benchwarmer CICS 6 Tue Apr 17, 2018 12:06 am
No new posts How to list data set names with diffe... murali.andaluri CLIST & REXX 8 Thu Apr 12, 2018 11:33 pm
No new posts Invalid XML character while producing... nikhil.bhole IBM Tools 4 Tue Mar 20, 2018 1:24 am
No new posts Get the list of data sets on DASD and... rakaitn JCL & VSAM 3 Thu Mar 08, 2018 12:38 pm
No new posts Data security erase on RAID device steve-myers All Other Mainframe Topics 0 Sat Jan 13, 2018 6:41 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us