DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
AKN
Participant



Joined: 28 Sep 2010
Posts: 4

Points: 48

Post Posted: Fri May 06, 2011 10:07 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Windows
Dear Talent Pool,
I have to read two COBOL copybook files (JOA,AOA) as source system.

JOA file contains 2 segment and AOA contains 10 segment. There are some relationships exists between JOA & AOA.

The data files are having fixed length and EBCDIC data type.

I have imported these segments by importing the each segment individually as I had recieved 12 segments sturcture in 12 separate individual files.

For two files I have used two CFF stage.

While reading the file, I encountered with the error "The Offset doesn't match"

Even I have tryied in keeping the 2 segments in one file and other 10 segments in other and done the import,. Again the error is same .


Please suggest on this.


Thanks,

_________________
Thanks

anayak
AKN
Participant



Joined: 28 Sep 2010
Posts: 4

Points: 48

Post Posted: Mon May 09, 2011 2:07 am Reply with quote    Back to top    

Just adding few details about the above to read the COBOL file.

JOA file contains two segments such as S00300X0 and S00300X1.

S00300X0 segmental stucture is as follows:

01 S00300X0.
05 S00X0-RGL-SA-DB-KEY.
10 S00X0-RGL-SA-DB-TYP PIC X.
88 S00X0-RGL-SA-POINTER VALUE '8'.
10 S00X0-RGL-SA-TBL-TYP PIC X.
88 S00X0-RGL-SA-CL VALUE '3'.
88 S00X0-RGL-SA-IL VALUE '4'.
88 S00X0-RGL-SA-MP VALUE '5'.
88 S00X0-RGL-SA-DC VALUE '6'.
88 S00X0-RGL-SA-CM VALUE '7'.
10 S00X0-RGL-SA-CLASS PIC X(5).
10 S00X0-RGL-FILLER-1
REDEFINES S00X0-RGL-SA-CLASS.
15 S00X0-RGL-SA-TBL-NO PIC XXX.
15 S00X0-RGL-FILLER-2 PIC XX.
10 S00X0-RGL-SA-ST-CD PIC XX.
05 S00X0-RGL-SA-DATA.
10 S00X0-RGL-FILLER-3 PIC X(10).

S00300X1 segmental stucture is as follows:

01 S00300X1.
05 S00X1-RGL-SA-DB-KEY.
10 S00X1-RGL-SA-ST-ADOPT-DT PIC 9(7).
10 S00X1-RGL-SA-MAINT-DT PIC 9(7).
05 S00X1-RGL-SA-DATA.
10 S00X1-RGL-SA-VER-ID PIC X(6).
10 S00X1-RGL-SA-TBL-NO PIC XXX.
10 S00X1-RGL-SA-FILLER PIC X(10).

I have taken the Import separately for these two segments.

While moving to the " LayOut" tab after setting up all properties in the previous tabs of CFF stage in parallel job, I am getting some error message in the "LayOut" tab as below.
The offsets for record ID columns do not match!
The record ID value <''> is not unique!
.
Due to which I am unable to read the JOA file.

Any idea what I am missing in the settings up?

Would appreciate your fast suggestion.

_________________
Thanks

anayak
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 431
Location: Malvern, PA
Points: 3965

Post Posted: Mon May 09, 2011 7:21 am Reply with quote    Back to top    

Anayak,

There are two considerations here. One is whether you are confident that CFF can handle the input layout as is. The other is how you intend to use the redefined fields.

The first important question: What platform are you reading from with CFF? If it is the usual mainframe OS with filehandling in catalogs, your first choice is to define your inputs with record type = implied and delimiter = none. With this, any offset problems can be identified easily by comparing the column definitions with the source data. Import can cause problems, especially when you let it flatten complex fields for you.

I've found it best to resolve redefines before importing. For example, do you need to know in the table definition that S00X0-RGL-SA-CLASS PIC X(5) contains S00X0-RGL-SA-TBL-NO PIC XXX plus filler, or can you handle that in a transformer? It's less convenient, but easier to handle downstream.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Rate this response:  
Not yet rated
AKN
Participant



Joined: 28 Sep 2010
Posts: 4

Points: 48

Post Posted: Mon May 09, 2011 9:26 am Reply with quote    Back to top    

Thanks for your valuable input,Frankline
Here I am trying to read the cobol file from the UNIX environment using CFF stage in a parallel job.

So mainframe OS option is not available with me.

In the table definition S00X0-RGL-SA-CLASS PIC X(5) contains S00X0-RGL-SA-TBL-NO PIC XXX plus filler also.

Any idea how do I read it using any othere stages or options?

_________________
Thanks

anayak
Rate this response:  
Not yet rated
FranklinE



Group memberships:
Premium Members

Joined: 25 Nov 2008
Posts: 431
Location: Malvern, PA
Points: 3965

Post Posted: Mon May 09, 2011 10:29 am Reply with quote    Back to top    

AKN wrote:
Thanks for your valuable input,Frankline
Here I am trying to read the cobol file from the UNIX environment using CFF stage in a parallel job.

So mainframe OS option is not available with me.


You're welcome. Is it possible that CFF is the problem? I have little experience with it, and I'm wondering if you should be using a sequential file stage instead, or if you are dealing with a remote server use FTP. Anyone else reading this thread have an opinion? Confused

AKN wrote:
In the table definition S00X0-RGL-SA-CLASS PIC X(5) contains S00X0-RGL-SA-TBL-NO PIC XXX plus filler also.

Any idea how do I read it using any othere stages or options?


I would just use a transformer to parse the PIC X(5) field for the first three bytes when you need it for the TBL-NO value.

Code:
Input_link.S00X0-RGL-SA-CLASS[1,3]


In my opinion -- I'm something of a conservative when it comes to Cobol design -- redefines should only be used when the format of the field needs to be changed and you want to avoid writing MOVE statements, not for a different set of values with a different length. I'm assuming there's some logic behind it, and I'd use that logic to decide when I need the redefined value.

_________________
Franklin Evans
"Shared pain is lessened, shared joy increased. Thus do we refute entropy." -- Spider Robinson
Rate this response:  
Not yet rated
AKN
Participant



Joined: 28 Sep 2010
Posts: 4

Points: 48

Post Posted: Sat May 28, 2011 10:52 am Reply with quote    Back to top    

I have changed the stucture of the segment based on the data available in the file to be read. After that the error I was encountering is elliminated. Very Happy

_________________
Thanks

anayak
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