IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Data from WTX to Cobol

    Posted 05/11/07 08:07 AM

    Originally posted by: SystemAdmin


    Hi,

    I use an user exit program written in Cobol (PAIN112) and I pass the data of one output card (OUTPUT1) to it. The rule for the field in the next output card (OUTPUT2) looks like this: OUTPUT2 = EXIT(" ", "PAIN112", TEXT(OUTPUT1)). The length of OUTPUT1 is 22043 Bytes (in WTX, I checked it by the file size). When I check the length of the input data passed to the user exit program I got a length of 22199 Bytes (in Cobol). Why there is an difference of 156 Bytes? I try it with other type trees but there is still the same difference.

    Platform is z/OS.

    Andreas
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 2.  Re: Data from WTX to Cobol

    Posted 05/11/07 08:14 AM

    Originally posted by: janhess


    Have you specified all the fields as fixed length padded any context?
    Also see previous posts as there may be a bug trying to create some fixed length output.
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 3.  Re: Data from WTX to Cobol

    Posted 05/11/07 02:13 PM

    Originally posted by: SystemAdmin


    The file size unter Windows is 22043 Bytes (but that's not my problem). The size of the Cobol structure (PAIN112C) is 22299 Bytes. (There is a gap of 256 Bytes, ok.) And the Cobol program - and that's the point - reports an input length of 22199 Bytes (LS-INPUT-LENGTH). Are the 100 Bytes lost? I will check this.
    The type tree for the output was generated via the copy book importer. All text fields are specified as fixed length padded any context. The other fields are numbers in binary packed format.
    Some code, nothing special.
    code
    000220 LINKAGE SECTION.
    000230*
    000240* WTX-EXIT Input fields
    000260*
    000270 01 LS-INPUT-LENGTH PIC 9(05) COMP.
    000271 01 LS-INPUT.
    000272 COPY PAIN112C.
    000290*
    000300* WTX-EXIT Output fields
    000320*
    000330 01 LS-OUTPUT-LENGTH PIC 9(05) COMP.
    000340 01 LS-OUTPUT PIC X.
    000350*
    000380 PROCEDURE DIVISION USING LS-INPUT-LENGTH
    000390 LS-INPUT
    000400 LS-OUTPUT-LENGTH
    000410 LS-OUTPUT.
    [/code]
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: Data from WTX to Cobol

    Posted 05/11/07 04:00 PM

    Originally posted by: SystemAdmin


    Ok, WTX has some problems with the padding of text fields, sized to minimum of 0. Better you set minimum to 1. Or you set the rule for fields with no content from =NONE to =" ".
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 5.  Re: Data from WTX to Cobol

    Posted 05/16/07 01:06 AM

    Originally posted by: jvanboga


    What version are you using. Are your maps running on the MF or are you importing them there from another environment? Are you dropping the length on all records or are some OK?

    Could be that you have a field or group with a bad definition. Most copybooks import fine but the tool used to have an issue with some copybook functions like redefines. Also, make sure any OCCURS imported properly.

    Other than the record length are all of your output fields lining up with the copybook? Have you tried running a validation map against your output to see if anything stands out (should only take several records)?

    Check you pad settings. We haven't had problems creating files for the mainframe using minimum lengths of zero as long as pad_to = Fixed Size (with a pad_to size equals the max field size) and Apply_Pad = Any context.

    That said, we create the files in Windows and ASCII FTP them to the MF.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: Data from WTX to Cobol

    Posted 05/16/07 10:08 AM
      |   view attached

    Originally posted by: SystemAdmin


    Many questions.
    Maybe a little bit of doing could help to understand my problem (I attached the file for the type tree to this post.)

    I made the following steps under Windows XP with Design Studio V8.1:
    I built a map with one output card using the attached type tree. I set the type to the group "a_PmtInf" and used the file adapter to build an output file. In the rule fields I "Insert NONE if empty". I run the map and get a file of 19560 bytes.
    Then I "Replace..." all rules from =NONE to =" ". In the amount fields (name ends with "Amt Field" or "Rate Field") I set =0. I run the map and get a file of 19816 bytes.
    If you use the whole structure (group TRANSACTIONS) you get a file with a size of 22043 or 22299 bytes. The Level1 structure a_GrpHdr (2483 bytes) seems ok, only the structure a_PmtInf doesn't work correctly.
    #IBM-Websphere-Transformation-Extender
    #DataExchange
    #IBMSterlingTransformationExtender

    Attachment(s)



  • 7.  Re: Data from WTX to Cobol

    Posted 05/16/07 10:28 AM

    Originally posted by: janhess


    Like I said before, I think it's a bug. Raise it with IBM support.
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender
    #DataExchange


  • 8.  Re: Data from WTX to Cobol

    Posted 05/17/07 02:51 AM

    Originally posted by: SystemAdmin


    I analyze the type tree by myself. I found out that the field "a_P_C_R_RmtLctnElctrncAdr Field" isn't well defined. If it set to NONE it should assigned to 256 spaces. This doesn't work. There seems to be a limit for special values. If I reduce the maximum size by 1 to 255 characters and assign only 255 spaces if NONE then all is well.
    Here the errorneous definition:
    code<ITEM SimpleTypeName="a_P_C_R_RmtLctnElctrncAdr" CategoryOrItemParent="Field CopyBook" Description="20 a:P-C-R-RmtLctnElctrncAdr pic x(256)." partition="NO" OrderSubtypes="ASCENDING">
    <CharTextWestern>
    <Size Min="0" Max="256"/>
    <PadText Justify="LEFT" ApplyPad="ANYCONTEXT">
    <PadValue><SP></PadValue>
    <PaddedToFixedSize Length="256"/>
    </PadText>
    <Western CharSet="NATIVE"/>
    <NONE RequiredOnInput="YES"> </NONE>
    <ValueRestrictions IgnoreCase="NO" Rule="INCLUDE"></ValueRestrictions>
    </CharTextWestern>
    </ITEM>[/code]
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender
    #DataExchange


  • 9.  Re: Data from WTX to Cobol

    Posted 05/17/07 05:08 AM