help for exception



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

help for exception

Postby adelinar » Mon Jun 22, 2015 9:06 pm

Exception 000529668 whit statment XML PARSE ... validating WITH FILE

I have a cobol pgm with the statment

XML PARSE input VALIDATING WITH mySchema-id
PROCESSING PROCEDURE p

but at the first row of input file :

<?xml version="1.0" encoding="utf-8"?>

i have the error 000529668 (RC=08, REASON=X'1504')

thanks for the help
adelinar
 
Posts: 4
Joined: Mon Jun 22, 2015 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: help for exception

Postby enrico-sorichetti » Mon Jun 22, 2015 9:14 pm

what happened when You researched the cobol/xml manuals
for the meaning of the RC 08 REASON 1504
or when You googled with
cobol xml rc 08 reason 1504 ???
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: help for exception

Postby adelinar » Mon Jun 22, 2015 9:18 pm

the error means

1504 XRSN_OSR_INVALID The data within the OSR is invalid

but i not use an OSR but i load the xsd schema with a file into a work of the pgm
adelinar
 
Posts: 4
Joined: Mon Jun 22, 2015 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: help for exception

Postby Robert Sample » Mon Jun 22, 2015 11:10 pm

If you are working on a mainframe, there is a problem. If the data is encoding UTF-8, you would not be able to read the first line -- a mainframe uses EBCDIC which is NOT UTF-8. How did the data get to the mainframe? If it was transferred as text, then encoding needs to be changed to a mainframe encoding.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: help for exception

Postby adelinar » Mon Jun 22, 2015 11:35 pm

Thanks,
The file input was transferred as text. How can i convert to a mainframe encoding ?
adelinar
 
Posts: 4
Joined: Mon Jun 22, 2015 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: help for exception

Postby Robert Sample » Tue Jun 23, 2015 3:43 am

You could try
<?xml version="1.0"?>
or perhaps
<?xml version="1.0" encoding="ebcdic"?>
EBCDIC may need to be IBM-037 or IBM-1047 depending upon your site, but try EBCDIC first (but only if leaving the encoding off doesn't work -- defaults are usually the best way to go).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: help for exception

Postby adelinar » Tue Jun 23, 2015 6:25 pm

thanks, I tried this but also if I removed the total header from XML file or without encoding=utf-8 i got the same error.
adelinar
 
Posts: 4
Joined: Mon Jun 22, 2015 7:21 pm
Has thanked: 0 time
Been thanked: 0 time

Re: help for exception

Postby Regg001 » Thu Dec 10, 2015 6:55 am

I had similar issue - i solved it by uploading the file using binary to the unix shelf instead of text mode. Then i was able to run a xsdosrg command on the file and it worked.

I haven't found a ''decent'' way to translate everything in a unix session. Short cut i'm using, i do my mods on my laptop on the source - then re-upload the file in binary mode to the mainframe and it works.

Are you running your program part of a CICS region ? (parse with validation).. If so , how did you defined the OSR file to the CICS region to allow the program to use it as an input file to create your work area ?
Regg001
 
Posts: 1
Joined: Thu Dec 10, 2015 6:49 am
Has thanked: 0 time
Been thanked: 0 time


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post