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 

Can the Load utility load comp-3 data

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri May 07, 2010 1:50 pm    Post subject: Can the Load utility load comp-3 data Reply with quote

I need to load a VSAM file that contains amounts in S9(5)V99 COMP-3 format. I've searched the manual and found nothing that seems to work. I have tried DECIMAL PACKED like this:
Code:

POSITION(055) DEC PACKED


The field looks like this S9(5)V99 COMP-3
Code:

5---
F---
5---
----
..&.
0050
020C


Any help is appreciated.
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri May 07, 2010 2:11 pm    Post subject: Re: Can the Load utility load comp-3 data Reply with quote

NASCAR9 wrote:
I need to load a VSAM file that contains amounts in S9(5)V99 COMP-3 format. I've searched the manual and found nothing that seems to work. I have tried DECIMAL PACKED like this:
Code:

POSITION(055) DEC PACKED


The field looks like this S9(5)V99 COMP-3
Code:

5---
F---
5---
----
..&.
0050
020C


Any help is appreciated.


Are you loading the contents of vsam cluster into DB2 table?

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri May 07, 2010 2:39 pm    Post subject: Reply with quote

Hi kolusu,
Right now I'm just testing loading COMP-3 data. We are slowly converting from VSAM to DB2. Does this answer your question?
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri May 07, 2010 4:11 pm    Post subject: Reply with quote

NASCAR9 wrote:
Hi kolusu,
Right now I'm just testing loading COMP-3 data. We are slowly converting from VSAM to DB2. Does this answer your question?


Nascar9,

If your DB2 table column is defined as DECIMAL(7,2) or NUMERIC(7,2) you should be ok. Remember that you if your VSAM cluster is variable cluster you might want to add the positions correctly.

Can you copy the vsam cluster data to a seq file and re-load it?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri May 07, 2010 4:29 pm    Post subject: Reply with quote

kolusu,
The file is a seq. file I sorted off a few records to test with. The file is fixed length. I only included the prortion of the load I'm have problems with. We typically would define a Decimal DB2 column that will contain dollars as DEC(9,2).
The VSAM files are old, when storage was expensive they were defined small. Enough rambling.

the type of data I need to load is like this:

S9(3)V99 COMP-3
S9(5)V99 COMP-3
S9(7)V99 COMP-3

In DB2 they will be DEC(9,2).

The load has NOT worked yet. angry
_________________
Thanks,
NASCAR9
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri May 07, 2010 5:01 pm    Post subject: Reply with quote

NASCAR9,

You need to change the load card to specify the length where the PD field ends

for ex s9(3)V99 takes 3 bytes so you need to specify the ending position. Assuming the seq file has the COMP-3 field at pos 55 you would have load card as

Code:

POSITION(055 : 057 ) DEC PACKED

for S9(5)V99 COMP-3 it would be
Code:

POSITION(055 : 058 ) DEC PACKED

for S9(7)V99 COMP-3 it would be
Code:

POSITION(055 : 059 ) DEC PACKED


Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
NASCAR9
Intermediate


Joined: 08 Oct 2004
Posts: 274
Topics: 52
Location: California

PostPosted: Fri May 07, 2010 5:46 pm    Post subject: Reply with quote

Kolusu,
Once again you've come thru!
Thank You for all your help! Very Happy
_________________
Thanks,
NASCAR9
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 -> Database 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