× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Neal -

COMP in COBOL is a binary field, whereas COMP-3 is a packed decimal field. 
COMP fields are (in my case "were" since I haven't written COBOL in a while) 
typically used as indexes in COBOL.

PIC S9(08) indicates that the field is a signed (the S indicates signed), 
numeric (the 9 indicates numeric) field with a length of 8 (the 08 in parens 
indicates the length of the field) so your iSeries PF field needs to be 
defined as 4B (or is it 8B?  I forget . . .) if you're using DDS to define 
the PF.

I would guess that your CWBDB0052 error is because CA couldn't convert the 
binary field and is notifying you of that fact even though the transfer, as 
a whole, was completed.

HTH,
Steve


"Neal Hudson" <nealhudson@xxxxx> wrote in message 
news:mailman.1851.1154527214.2610.midrange-l@xxxxxxxxxxxxxxx
Hi there,

I'm looking for some advice/help on a file that I'm having some trouble 
with. The file originates from a mainframe, and is sent over to our 
iSeries (V5R2M0) via Connect:Direct. The file is 3680 Bytes long, 
comprising of string and compressed numeric data. I have the layout of the 
file, although it's in a notation I'm not familiar with, Cobol I think it 
is, which gives me the start and end position of all the fields, and what 
type they are.

My aim is to get this file from the 400 to a PC, with all the fields, in a 
CSV format, on a monthly basis as it's received. This solution is an 
interim one, probably lasting for a few months, no longer than a year.

What I've done is set up a physical file, defining all 300 or so fields in 
the file. I then copy the file received in the Connect:Direct library into 
my own file using the CPYF command with a *NOCHK option. This works fine, 
all the records are copied, but when I query the file 1 of the fields is 
unreadable and I get the message "Column B9012 contains replacement 
character +".

This field is defined in the layout file I have as:
  211         09 PRRS-S1C-EDITION-NUMBER        PIC  S9(08) COMP.
This means that the field starts at position 211 in the file. The next 
field starts at position 215, so I've defined my field in the physical 
file as:
A            B9012          7P 0       TEXT('S1C-EDITION-NUMBER')
All the other compressed numeric fields have the notation COMP-3., whereas 
this one is only COMP. - I'm not sure what the difference is there.
It would seem that the field is a compressed or packed numeric field, of 
8, but for it to start at 211 and end at 215 I have to define it as 7 in 
the physical file. Do you have an idea of what I can do here?

At the moment, seeing this field is not essential, after the copy file 
command I'm just running through the file and setting the value to 0.

The next question I have is around Client Access. When I run Query, there 
are no errors shown in the file. However, when I try to use the "Receive 
File From Host" facility in Client Access, I get the error "CWBDB0052 - 
Error occurred during data conversion", but all records transfer 
successfully. I can't figure out which fields are in error, although from 
reading on the internet it would appear there may be null values that are 
causing this. I've switched off the option to display warnings during data 
transfer, which stops the message occurring. Would there be a problem I'm 
masking by doing this?





As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.