Another problem in Data Stage OS-390

Archive of postings to DataStageUsers@Oliver.com. This forum intended only as a reference and cannot be posted to.

Moderators: chulett, rschirm

Locked
admin
Posts: 8720
Joined: Sun Jan 12, 2003 11:26 pm

Post by admin »

External Routines and for that matter most other stages do not really handle Cobol groups. They work on a column per column / field per field basis. You have to work around the Group issue. One way is to concatenate all the various 05 level fields into 1 variable (e.g. a stage variable) using the string concatenation operator || in a Transformer stage prior to the External Routine stage. However, Binary/Comp, and Decimal/Comp-3 fields need special attention. You MUST put them in Display Numeric/Alphnumeric format and the External Routine has to accept them that way. You might think you could treat comp and comp-3 as a character string for the proper length, but if the internal hex representation of a value ends up having a X00 in it (e.g. s9(4) comp with a value of 2 looks like x0002) you will have problems. The x00 is treated as the end of the character string. You lose everything from the x00 on.

If you have an existing called module that wont be modified, that has to have comp/comp-3 variables in a group variable, then good luck. Your option then is to write a separate called module (non datastage program) that has all the params defined individually, which you call from your datastage program. It in turn will then have to format the parms into groups and call the actual existing module that you want.


Rich Meinke
rmeinke@mbco.com
414.931.3419

-----Original Message-----

Date: Wed, 22 Aug 2001 12:02:09 +0100
To: "Datastage-Users (E-mail)"
From: =?iso-8859-1?Q?Victor_Pinh=E3o?=
Subject: Another problem in Data Stage OS-390
Message-ID:

I use a external routine, to converte to EURO, and that have as Input, = 24 parameters, each parameters is a group, ex

CALL Routine PARAM1 PARAM2 PARAM3 PARAM4 ....

and PARM1 is defined

01 PARAM1
05 Field1 PIC X(08).
05 Field2 PIC 9(12).
05 Field3 PIC X(200).

The output of the routine is the same 24 parameters.

And i have 30 fields to convert.

Before i call de routine i need, to initialize my parameters and move. = Now i want to do this :

INITIALIZE PARM1
MOVE STRING to Field1
MOVE 99999 to Field2
CALL Routine PARAM1 PARAM2 ....

1=BA - How can i Initialize a group ?
2=BA - How can i move values to a field of one group (level 05 ), and = then move the group (level 01) ?

Victor Pinh=E3o,
Novabase Data Quality - MI
Locked