Spaces to COMP-3 field in Mainframe

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

Spaces to COMP-3 field in Mainframe

Post by svga »

Hi,

Is it possible to populated spaces to COMP-3 field? Thanks
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Technically Yes. Functionally No.

What do you want to do ?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

In COBOL it would involve a REDEFINES and you'd end up with a number like 202020.20 or some such. Or 404040.40, depending on the ascii versus ebcdicness of it, from what I recall. :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
svga
Participant
Posts: 73
Joined: Thu Aug 07, 2008 6:31 am
Location: Syracuse

Post by svga »

The target datatype is S999 COMP-3. I need to move spaces to this field
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Why? Spaces is not valid as COMP-3. Read again the advice above. It can only work if you re-define the field as something that will take spaces, typically PIC X(n).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply