Topic
5 replies Latest Post - ‏2004-06-02T10:31:02Z by SystemAdmin
SystemAdmin
SystemAdmin
93 Posts
ACCEPTED ANSWER

Pinned topic PIC Comp 3 data type

‏2004-05-21T15:17:49Z |
I have a data type which shows like:
PIC S9(11) COMP-3 and I have to convert this into a date format of mm dd yyyy.
Please let me know what function to use to get this.

Thanks

Prashant
Updated on 2004-06-02T10:31:02Z at 2004-06-02T10:31:02Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    93 Posts
    ACCEPTED ANSWER

    Re: PIC Comp 3 data type

    ‏2004-05-22T03:35:54Z  in response to SystemAdmin
    If you're planning to do this with a BASIC Transformer stage, then you can use the data type conversion functions in the SDK.
    Otherwise you'll need to "roll your own" in the PX environment.
  • SystemAdmin
    SystemAdmin
    93 Posts
    ACCEPTED ANSWER

    Re: PIC Comp 3 data type

    ‏2004-05-22T11:10:48Z  in response to SystemAdmin
    Thanks,
    I have a date field coming out of Mainframe as PIC S9(XX) Comp-3 where i used a sdk DataTypePicComp3 to convert into an internal format which yields a result of 0.
    Now i have to use a Oconv to get it into mm dd yyyy . I have been trying several options but am not able to get it.
    Please suggest what to do.

    My process is :
    date field coming out of Mainframe as " ..ag^.."
    I use a sdk DataTypePicComp3 and conver it into a 0
    Now whis OCONV function to use to get it into the desired format.

    My transformer looks like ( for now) :
    DateTypePicComp3(XXXXX.datefield)

    I understand that I have to use a OCONV/ICONV but please advise which one as I am not getting any results , I only get 0.

    Thanks,
  • SystemAdmin
    SystemAdmin
    93 Posts
    ACCEPTED ANSWER

    Re: PIC Comp 3 data type

    ‏2004-05-22T22:29:24Z  in response to SystemAdmin
    You've posted this in the DataStage EE MVS forum but you're talking about Oconv. Can you please verify whether you're asking about a mainframe job or a server job?
    I, too, was at fault, because I referred to a stage type from a parallel job.
  • SystemAdmin
    SystemAdmin
    93 Posts
    ACCEPTED ANSWER

    Re: PIC Comp 3 data type

    ‏2004-05-23T01:02:18Z  in response to SystemAdmin
    Ray, it is a server job
  • SystemAdmin
    SystemAdmin
    93 Posts
    ACCEPTED ANSWER

    Re: PIC Comp 3 data type

    ‏2004-06-02T10:31:02Z  in response to SystemAdmin
    Prashant,

    when using transforms like DataTypePicComp3 be sure to have an unconverted mainframe file. Usually it has to be ftped down to your UNIX or WINDOWS server in binary format. Otherwise these fields get "converted" and you'll never be able to extract correct values.

    Klaus