DataStage equivalent datatype of mainframe

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
skp
Premium Member
Premium Member
Posts: 135
Joined: Wed Dec 26, 2007 1:56 am
Location: India

DataStage equivalent datatype of mainframe

Post by skp »

Hi,

I got the mainframe file and the data comes as below,
101010+

I need to read this as 1010.10+ into data stage. I tried different ways to read it using copy book,but i did not get exact picture type.

Could some one provide the picture type to read into datastage?

Thanks
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Please post the copybook, including the full PIC clauses. I can't comment on your problem without them.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
skp
Premium Member
Premium Member
Posts: 135
Joined: Wed Dec 26, 2007 1:56 am
Location: India

Post by skp »

Hi,

This is my copy book content given below,

01 RECORDIDENTIFICATION.
03 AMOUNTS PIC 9(4)V99S.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK... a signed number with an implied decimal.

So about this need you have. What is your target - do you want to read it into a string so you end up with an explicit sign (+/-) at the end? Or you just need it to be a properly signed decimal? Assuming the former as the latter should happen automatically.

You never specified what stage you are using, the "different ways" you tried nor what exactly you got when you tried them. Always good to include information and examples of that nature.
Last edited by chulett on Wed May 14, 2014 12:01 pm, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
rameshrr3
Premium Member
Premium Member
Posts: 609
Joined: Mon May 10, 2004 3:32 am
Location: BRENTWOOD, TN

Post by rameshrr3 »

Have you imported the copy book Successfully ? Then open table def , and go to layout , select the parallel radio button , and see what datatype it defines to that column. Use this in your schema file or in the sequential file's columns tab . so that you dont have to write a transfomer derivation unnecessarily.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Post by FranklinE »

Upon import, AMOUNTS PIC 9(4)V99S should be Decimal(6,2) and in the column properties you should find trailing sign set.

Based on your first post, the column is Decimal(6,0) with trailing sign. It should be that simple to fix.

The thing to remember is the Cobol standard for storing numeric data: never have an explicit position for the decimal. You define it when you read it. It looks the same when you write it, assuming the same number of digits, regardless of how it's defined for the written record. It's not recommended, but you can write something like PIC 9(6)V9(2) and read it with PIC 9(2)V9(6) and there's nothing that prevents it.
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: viewtopic.php?t=143596 Using CFF FAQ: viewtopic.php?t=157872
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Still curious what their target is...
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply