i want to write subroutine for date convertaion

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
sekharg_dw
Participant
Posts: 19
Joined: Mon Jul 18, 2005 5:37 am

i want to write subroutine for date convertaion

Post by sekharg_dw »

Hi !
i want to write subdroutine to convert the date formate in to some other format assume that that the format is not present in built in subroutine .
eg :- dd/yyyy/mm to mm/dd/yyyy .
please guide me how to write achive this .
the same issuse i have discussed with many of my frnds . what they have told is subroutines is meant for only simple calculation how far it is true. :shock:

in advnce thanks
s
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

sekharg_dw,

DataStage subroutines are not only for small and simple work, the are very powerful and versatile. Your idea of a date conversion routine is probably very good for your site.

Tell us what you've done so far and what you are missing and I'm sure you'll get some assistance.
rkdatastage
Participant
Posts: 107
Joined: Wed Sep 29, 2004 10:15 am

Post by rkdatastage »

Hi

You can solve this by using the builtin functions like ICONV and OCONV

where you can convert the date as per your requirement.

Hope your problem be solved

RK
sekharg_dw
Participant
Posts: 19
Joined: Mon Jul 18, 2005 5:37 am

Post by sekharg_dw »

ArndW wrote:sekharg_dw,

DataStage subroutines are not only for small and simple work, the are very powerful and versatile. Your idea of a date conversion routine is probably very good for your site.

Tell us what you've done so far and what you are missing and I'm sure you'll get some assistance.
I would like to know what is the difference between routine and subroutine.
2. can we write for loop in subroutine.
3. for date converstation i want to know how to write userdefine subroutine, please dnt suggest Icon,ocon.
4.suppose if i want to write icon and ocon in subroutine code how to call that function ? or i need to write the function names in code..
thanks ,
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

sekharg_dw,

I am a bit surprised at some of your questions. I dislike being too blunt, but it seems that you are trying to get people here to give you programs and tools and that you haven't been able to attend a training class but don't want to try learn yourself. Your rank of 3/5 and 2/5 for Server and Parallel extender belies this, so I don't know what I should think.

I asked about what you had tried, since if you had attempted to write a routine and posted your error messages you would have received help; but you not only want a routine, but also specify what you don't want to see (ICONV/OCONV).

Asking if you can do a FOR...NEXT or REPEAT...UNTIL loop when the BASIC programming manual on your PC describes this and much more functionality in 924 pages tell me that you haven't bothered to open up the manual or even browse this forum for already existing code.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Some people here would be happy to sell - not give - you routines and other tools; but it would still be incumbent upon you to create some form of specification.

There are two types of routine for server jobs; before/after subroutine (callable from jobs and active stages) and transform functions (callable from expressions).
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