What is @FM

A forum for discussing DataStage<sup>®</sup> basics. If you're not sure where your question goes, start here.

Moderators: chulett, rschirm, roy

Post Reply
atulgoel
Participant
Posts: 84
Joined: Tue Feb 03, 2009 1:09 am
Location: Bangalore, India

What is @FM

Post by atulgoel »

Hi All,

I came across below function in my existing code. I want to analyze what exactly this does and what @FM refers to? Any idea?

Ereplace(Trim(Convert(@FM ,"", cmd_List_Files.$CommandOutput)), p_HrSrcFileDir , "")

Regards,
Atul
Atul
kmsekhar
Premium Member
Premium Member
Posts: 58
Joined: Fri Apr 16, 2010 12:58 pm
Location: Chn

Re: What is @FM

Post by kmsekhar »

@FM --> Field mark: CHAR(254). Same as @AM.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

@FM is not a function - it is a system variable, and is preloaded with the ASCII code 254. Historically, in the UniVerse database, this character is the principal delimiter in a special kind of delimited string called a "dynamic array". Since DataStage was originally built on UniVerse, @FM is still seen in many places.

When DataStage reads a multi-line file in a single operation, the line terminators are converted automatically (by DataStage) into field marks. That way it doesn't matter whether you've read a UNIX file or a DOS file - the resulting string is exactly the same. Your Convert() function is removing any field marks (replacing them with "").
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