Re: Optional and Variable Length Fields

25 views
Skip to first unread message

Fady Moussallam

unread,
May 11, 2013, 2:28:35 PM5/11/13
to legsta...@googlegroups.com
can you provide sample data that is supposed to comply with your copybook?


On Fri, May 10, 2013 at 6:08 PM, Aravindan Ramkumar <aravindan...@gmail.com> wrote:
Attached is a cpy file, for which i have a Java bindings mapped.

It turns out that the message I am getting from the mainframe doesnt follow this schema, here are the changes,

DLV-HDR-REC2 field 8 should be an optional field
DLV-HDR-REC3 field 2 is a maximum of 60 characters (but may be fewer)
DLV-HDR-REC3 field 3 is optional

How to define optional fields and fields with variable lengths?

--
You received this message because you are subscribed to the Google Groups "legstar-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to legstar-user...@googlegroups.com.
To post to this group, send email to legsta...@googlegroups.com.
Visit this group at http://groups.google.com/group/legstar-user?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Aravin

unread,
May 15, 2013, 11:11:25 AM5/15/13
to legsta...@googlegroups.com
Attached. This doesn't comply because of the changes that i mentioned in my post.

"*DLV    1624420000000000175020FEDS130429016149G37000196431             USDUSDTWS\r\n" +
                "2DLV130513000000040424.59000000040424.5900000.0000000.000000000.00000000000\r\n" +
                "3DLVIMAD: 0513L2B76Y1C000149   Ref: 2013042900016149\r\n" +
                "/DLV    162442"

Fady

unread,
May 17, 2013, 2:06:10 AM5/17/13
to legsta...@googlegroups.com
Thank you for sending this.

Legstar will not be able to do what you want though. Legstar parses fields based on the fixed position given by the copybook. 

What you are describing implies that the position of DLV_LINE_BRK is not fixed in the DLV_HDR_REC2. On mainframes this is not possible (outside the DEPENDING ON clause) but maybe you are using a more flexible COBOL compiler/runtime.

Sorry for that 
Reply all
Reply to author
Forward
0 new messages