DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
Author Message
naveen7690
Participant



Joined: 12 Mar 2019
Posts: 1

Points: 28

Post Posted: Tue Mar 12, 2019 8:55 am Reply with quote    Back to top    

DataStage® Release: 11x
Job Type: Parallel
OS: Windows
Additional info: EBCDIC to ASCII
Hi All,

I've been searching a lot of posts for a solution on handling a cobol EBCDIC file with occurs depending on clause. Kindly help/suggest me on how to proceed further:

File Type: EBCDIC, Fixed width

I have few amount fields(sub records) for each record type which can occur upto 40 times based on a count field(integer). I've managed to flatten it into a single record , each having all the 40 sub groups. Now I've to load them into my DB and the table load requirement is such that each subgroup is loaded record wise instead of a single record having account_id has a reduntant field.

My Copybook(example):

01 RECORD ID
01 ACCOUNT ID
01 COUNT
01 AMOUNT occurs 40 times depending on COUNT
02 AMOUNT_DATE
02 AMOUNT_TRANS_ID

(i've overall 100 fields in level 1 and approx 50 fields in lvl 2)

My table load requirement:
ACCOUNT_ID|AMOUNT_DATE|AMOUNT_TRANS_ID
123|xyz|abc
123|pqr|def
456|ymd|abc
456|ymd|def
456|ymd|ghi
etc (single account can have all 40 sub records under the same schema)

Please suggest a possible solution. As the records are dynamic based on the count field , DBA doesnt want a lot of nulls and mulitple fields with 0 data.

_________________
thanks&Regards
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 734
Location: Malvern, PA
Points: 6963

Post Posted: Wed Mar 13, 2019 7:10 am Reply with quote    Back to top    

The FAQs at the end of my post will give you more general assistance with COBOL/EBCDIC data.

The latest wisdom from IBM references version 9.1, but it might still be true.

https://www.ibm.com/support/knowledgecenter/en/SSZJPZ_9.1.0/com.ibm.swg.im.iis.ds.mfjob.dev.doc/topics/r_dmnjbref_Using_a_Complex_Flat_File_Stage.html

The first links says that if you have OCCURS DEPENDING, you should use variable-block type:

Block type. Select the block type of the source file. The default is Fixed block file, which indicates that the source file contains fixed record lengths. Complex Flat File stages can also be used to read variable-block files with or without OCCURS DEPENDING ON clauses.

Array handling in CFF: https://www.ibm.com/support/knowledgecenter/SSZJPZ_9.1.0/com.ibm.swg.im.iis.ds.mfjob.dev.doc/topics/r_dmnjbref_Array_Handling_CFF_Stage.html

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson

Using mainframe data FAQ: http://www.dsxchange.com/viewtopic.php?t=143596 Using CFF FAQ: http://www.dsxchange.com/viewtopic.php?t=157872
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours