|
|
| Author |
Message |
amit039
New User
Joined: 08 Jul 2008 Posts: 7 Location: Chennai
|
|
|
|
Hi,
This is my first post in this forum.
I'm trying to use the IKJEFT01 OCOPY option in order to convert an EBCDIC data to ASCII. I'm using the following OCOPY :
OCOPY INDD(INPUT) OUTDD(OUTPUT) TEXT CONVERT('SYS1.MYLIB(MYTAB)') TO1047
I also tried:
OCOPY INDD(INPUT) OUTDD(OUTPUT) TEXT CONVERT((BPXFX311)) FROM1047
However I'm getting an S0000 U0102 abend in both cases. I think they may be due to the table aliases/table names used.
How can I get rid of this abend & use the OCOPY successfully ?  |
|
| Back to top |
|
 |
References
|
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8726 Location: 221 B Baker St
|
|
|
|
Hello,
If you convert the file to ASCII on the mainframe, how will it be used? |
|
| Back to top |
|
 |
MBabu
New User
Joined: 03 Aug 2008 Posts: 39 Location: Mumbai
|
|
|
|
| I've never had luck with OCOPY and translation. iconv works well though for this but it is an extra step |
|
| Back to top |
|
 |
amit039
New User
Joined: 08 Jul 2008 Posts: 7 Location: Chennai
|
|
|
|
Hi all,
The data is supposed to be to a database used by java front end programs. However the EBCDIC to ASCII conversion is taken care by FTP.
However I misunderstood the format of the input:oops:. It is in some kind of binary format & I used DFSORT to format. I used the following in SYSIN part to convert it...
OPTION COPY
OUTREC FIELDS=(1,43,
44,4,BI,TO=ZD,LENGTH=8,
48,63,
111,4,BI,TO=ZD,LENGTH=8,
115,52,
167,4,BI,TO=ZD,LENGTH=8,
171,4,BI,TO=ZD,LENGTH=8,
175,65,
240,3,PD,TO=ZD,LENGTH=5,
243,195)
However I'm still getting some unwanted characters in the output.....  |
|
| Back to top |
|
 |
superk
Moderator Team Head
Joined: 26 Apr 2004 Posts: 3304 Location: Charlotte,NC USA
|
|
| Back to top |
|
 |
amit039
New User
Joined: 08 Jul 2008 Posts: 7 Location: Chennai
|
|
|
|
| The problem was few fields were in binary & packed decimals.. |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 756 Location: Chennai, India
|
|
|
|
| Quote: |
| However I'm still getting some unwanted characters in the output |
Are u trying to convert binary/packed into displayable format? What output you r getting while using the card mentioned above and what's the expected output?
Thanks,
Arun |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8726 Location: 221 B Baker St
|
|
|
|
Hello,
If you are going to transfer the file to a windows or unix system, you will probably not be able to use zoned-decimal - the ascii systems do not use the same zoned-decimal the mainframe does.
You need to convert the packed and/or binary numerics to an edited format that would include a physical decimal-point (if there is one) and the minus sign "-" for negative numbers (i.e. 123.45-). |
|
| Back to top |
|
 |
amit039
New User
Joined: 08 Jul 2008 Posts: 7 Location: Chennai
|
|
|
|
Hi all,
I'm able to transform the data format I mentioned to zoned decimal display using the code I mentioned. Though as the front end testing has not yet started I'm not yet sure whether the correct format is received there.
Dick,you mentioned about converting the binary & packed numerics to some edited format. Can you please specify which format I should switch to. Also I'm very new to mainframe programming. It would be very helpful if you leave a hint how I should proceed with it...  |
|
| Back to top |
|
 |
dick scherrer
Global Moderator
Joined: 23 Nov 2006 Posts: 8726 Location: 221 B Baker St
|
|
| Back to top |
|
 |
amit039
New User
Joined: 08 Jul 2008 Posts: 7 Location: Chennai
|
|
|
|
Thanks Dick..I'll try it out...  |
|
| Back to top |
|
 |
|
|