I am having a progress program that i need to run in eB2. But I need to use a shell script and that is the requirement.
Can any one help me ?
sample progress program :
define stream xcim-stream.
define variable m_company like code_cmmt no-undo.
define variable m_name as char format "x(50)" no-undo.
define variable n_name as char format "x(50)" no-undo.
define variable cfilename as char format "x(40)" no-undo.
define variable ctoday as char format "x(8)" no-undo.
for FIRST CODE_mstr WHERE CODE_fldname = "XX_SFDC_COMP"
AND code_value = "QAD_ID"
NO-LOCK :
end.
if available code_mstr then
assign m_company = CAPS(TRIM(CODE_cmmt)).
assign
ctoday = string(today)
ctoday = replace (ctoday, "/","")
m_name = m_company + ctoday
cfilename = "/export/home/scripts/eb2/mqad/spm/data/" + m_name + "-PT_MSTR DAT.csv" .
output stream xcim-stream to value (cfilename) .
PUT STREAM xcim-stream UNFORMATTED
'"' "ERP Product" '"' ";"
'"' "Created By" '"' ";"
'"' "Date on which record created created" '"' ";"
'"' "Change Date" '"' ";"
'"' "Effective From" '"' ";"
'"' "ERP Category" '"' ";"
'"' "Material Type" '"' ";"
'"' "Reporting UOM" '"' ";"
'"' "Commodity ID" '"' ";"
'"' "Unit Price" '"' ";"
'"' "Height" '"' ";"
'"' "Length" '"' ";"
'"' "ERP Supplier" '"' ";"
'"' "Width" '"' ";"
'"' "Language (ISO Code)" '"' ";"
'"' "Medium description" '"' ";"
'"' "Long description" '"'
SKIP.
FOR EACH PT_MSTR NO-LOCK :
export STREAM xcim-stream delimiter ";"
PT_PART
PT_USERID
PT_ADDED
PT_MOD_DATE
PT_ADDED
PT_PROD_LINE
PT_PART_TYPE
PT_UM
PT_COMM_CODE
PT_PRICE
PT_HEIGHT
PT_LENGTH
PT_VEND
PT_WIDTH
PT_DESC1
PT_DESC2
SKIP.
END. /* End of FOR EACH pl_mstr */
OUTPUT CLOSE.
Can any one help me ?
sample progress program :
define stream xcim-stream.
define variable m_company like code_cmmt no-undo.
define variable m_name as char format "x(50)" no-undo.
define variable n_name as char format "x(50)" no-undo.
define variable cfilename as char format "x(40)" no-undo.
define variable ctoday as char format "x(8)" no-undo.
for FIRST CODE_mstr WHERE CODE_fldname = "XX_SFDC_COMP"
AND code_value = "QAD_ID"
NO-LOCK :
end.
if available code_mstr then
assign m_company = CAPS(TRIM(CODE_cmmt)).
assign
ctoday = string(today)
ctoday = replace (ctoday, "/","")
m_name = m_company + ctoday
cfilename = "/export/home/scripts/eb2/mqad/spm/data/" + m_name + "-PT_MSTR DAT.csv" .
output stream xcim-stream to value (cfilename) .
PUT STREAM xcim-stream UNFORMATTED
'"' "ERP Product" '"' ";"
'"' "Created By" '"' ";"
'"' "Date on which record created created" '"' ";"
'"' "Change Date" '"' ";"
'"' "Effective From" '"' ";"
'"' "ERP Category" '"' ";"
'"' "Material Type" '"' ";"
'"' "Reporting UOM" '"' ";"
'"' "Commodity ID" '"' ";"
'"' "Unit Price" '"' ";"
'"' "Height" '"' ";"
'"' "Length" '"' ";"
'"' "ERP Supplier" '"' ";"
'"' "Width" '"' ";"
'"' "Language (ISO Code)" '"' ";"
'"' "Medium description" '"' ";"
'"' "Long description" '"'
SKIP.
FOR EACH PT_MSTR NO-LOCK :
export STREAM xcim-stream delimiter ";"
PT_PART
PT_USERID
PT_ADDED
PT_MOD_DATE
PT_ADDED
PT_PROD_LINE
PT_PART_TYPE
PT_UM
PT_COMM_CODE
PT_PRICE
PT_HEIGHT
PT_LENGTH
PT_VEND
PT_WIDTH
PT_DESC1
PT_DESC2
SKIP.
END. /* End of FOR EACH pl_mstr */
OUTPUT CLOSE.