How to read PIC -9.9 in complex flat file

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
sheema
Premium Member
Premium Member
Posts: 204
Joined: Sat Jul 22, 2006 10:20 am

How to read PIC -9.9 in complex flat file

Post by sheema »

In the cobol file definition provided one of the columns provided is PIC-9.9.
But the complex flat file stage was not able to import this column.
Can some one please let me know how this column can be imported.
I am getting the below error
'PIC' PICTURE character string format is invalid.
Thanks

Sheema
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Hmmm... I'd try changing the FD to show PIC S9.9 for that column and see if that works.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

"-" is not correct for showing a signed number. "S" is.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
shiva459
Premium Member
Premium Member
Posts: 100
Joined: Wed Jun 11, 2003 1:49 am
Location: Bangalore

Re: How to read PIC -9.9 in complex flat file

Post by shiva459 »

Declaring the data type as PIC +9.9 or PIC -9.9 is perfectly valid in Cobol world but DS is not able read it.Change the copy book to PIC X(4) for that field and try reading the source file.
FranklinE
Premium Member
Premium Member
Posts: 739
Joined: Tue Nov 25, 2008 2:19 pm
Location: Malvern, PA

Re: How to read PIC -9.9 in complex flat file

Post by FranklinE »

That's correct for Cobol, but I don't recommend changing the format type for the column. Adjust the numeric formatting first as Ray suggests, and change to Char only if it doesn't work.
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
shiva459
Premium Member
Premium Member
Posts: 100
Joined: Wed Jun 11, 2003 1:49 am
Location: Bangalore

Re: How to read PIC -9.9 in complex flat file

Post by shiva459 »

Problem is not with the sign but '.' DataStage table definition import somehow is not able to read the real decimal. Changing it to S9(1).9(1) or S9.9 will not work
Post Reply