xml files to mainframe
Is there any way to transfer an xml file to the mainframe and keep the look of it. By default it wraps the entire file into large records. I want this EDIT P08145.XML1 Columns 1 00072 Command === Scroll === PAGE ** * Top of Data ** 01 ?XML VERSION=1.0 STANDALONE=YES ? 02 - DATAPACKET VERSION=2.0 03 - METADATA 04 - FIELDS 05FIELD ATTRNAME=LOCN_ID FIELDTYPE=I4 / 06FIELD ATTRNAME=SERIAL_NUM FIELDTYPE=STRING WIDTH=12 / 07FIELD ATTRNAME=POSITION FIELDTYPE=I2 / 08FIELD ATTRNAME=GROUP FIELDTYPE=I2 / 09FIELD ATTRNAME=CHANNEL FIELDTYPE=STRING WIDTH=2 / 10FIELD ATTRNAME=SOURCE FIELDTYPE=STRING WIDTH=32 / 11FIELD ATTRNAME=STARTED FIELDTYPE=DATETIME / ** Bottom of Data But after transfer I get this BROWSEP08145.XML2Line Col 001 080 Command === Scroll === PAGE * Top of Data ** ?xml version=1.0 standalone=yes? DATAPACKET Version=2.0METADATAFIE fieldtype=i2/FIELD attrname=CHANNEL fieldtype=string WIDTH=2/FIELD ldtype=i2/FIELD attrname=CONTENT fieldtype=i2/FIELD attrname=UTC_BIAS rname=INDEX fieldtype=i2/FIELD attrname=RAW_VALUE fieldtype=i4//FIEL D attrname=INDEX fieldtype=i2/FIELD attrname=VALUE fieldtype=r8//FIE ELD attrname=VALUE fieldtype=r8//FIELDSPARAMS//FIELDFIELD attrname= IELD attrname=EVENTDETAIL fieldtype=nestedFIELDSFIELD attrname=TIME_STA nestedFIELDSFIELD attrname=TIME_STAMP fieldtype=dateTime/FIELD attrn FIELD attrname=POSITION fieldtype=i2/FIELD attrname=TIME_STAMP fieldty N_ID=6420005 SERIAL_NUM=06420005 POSITION=10 GROUP=1 CHANNEL=M SOURCE= ON=1 INDEX=1 RAW_VALUE=6012089/ROWCONFIG POSITION=1 INDEX=2 RAW_VALU Tim Brown Systems Specialist - Project Leader Central Hudson Gas Electric 284 South Ave Poughkeepsie, NY 12601 Email: tbr...@cenhud.com mailto:tbr...@cenhud.com Phone: 845-486-5643 Fax: 845-486-5921 Cell: 845-235-4255 This message contains confidential information and is only for the intended recipient. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please notify the sender immediately by replying to this note and deleting all copies and attachments. Thank you. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: xml files to mainframe
-Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Tim Brown Sent: Wednesday, February 17, 2010 12:31 PM To: IBM-MAIN@bama.ua.edu Subject: xml files to mainframe Is there any way to transfer an xml file to the mainframe and keep the look of it. By default it wraps the entire file into large records. I want this EDIT P08145.XML1 Columns 1 00072 Command === Scroll === PAGE ** * Top of Data ** 01 ?XML VERSION=1.0 STANDALONE=YES ? 02 - DATAPACKET VERSION=2.0 03 - METADATA 04 - FIELDS 05FIELD ATTRNAME=LOCN_ID FIELDTYPE=I4 / 06FIELD ATTRNAME=SERIAL_NUM FIELDTYPE=STRING WIDTH=12 / 07FIELD ATTRNAME=POSITION FIELDTYPE=I2 / 08FIELD ATTRNAME=GROUP FIELDTYPE=I2 / 09FIELD ATTRNAME=CHANNEL FIELDTYPE=STRING WIDTH=2 / 10FIELD ATTRNAME=SOURCE FIELDTYPE=STRING WIDTH=32 / 11FIELD ATTRNAME=STARTED FIELDTYPE=DATETIME / ** Bottom of Data But after transfer I get this BROWSEP08145.XML2Line Col 001 080 Command === Scroll === PAGE * Top of Data ** ?xml version=1.0 standalone=yes? DATAPACKET Version=2.0METADATAFIE fieldtype=i2/FIELD attrname=CHANNEL fieldtype=string WIDTH=2/FIELD ldtype=i2/FIELD attrname=CONTENT fieldtype=i2/FIELD attrname=UTC_BIAS rname=INDEX fieldtype=i2/FIELD attrname=RAW_VALUE fieldtype=i4//FIEL D attrname=INDEX fieldtype=i2/FIELD attrname=VALUE fieldtype=r8//FIE ELD attrname=VALUE fieldtype=r8//FIELDSPARAMS//FIELDFIELD attrname= IELD attrname=EVENTDETAIL fieldtype=nestedFIELDSFIELD attrname=TIME_STA nestedFIELDSFIELD attrname=TIME_STAMP fieldtype=dateTime/FIELD attrn FIELD attrname=POSITION fieldtype=i2/FIELD attrname=TIME_STAMP fieldty N_ID=6420005 SERIAL_NUM=06420005 POSITION=10 GROUP=1 CHANNEL=M SOURCE= ON=1 INDEX=1 RAW_VALUE=6012089/ROWCONFIG POSITION=1 INDEX=2 RAW_VALU Tim Brown Where is the XML generated and from where is it ftp'ed? I ask because the formatting should stay with the file when it is transferred to the z/OS system. The only time that I've had it do otherwise is when the file was created on UNIX, binary transferred to Windows, then ASCII transferred from Windows to z/OS. This latter does translate from ASCII to EBCDIC, but doesn't get the line endings correct, and so the lines wrap together during transfer but then are split apart when actually written to the z/OS dataset. A most weird circumstance. Have you looked at it in hex on mode? Is there a x'0d' (or maybe x'0a') where you would expect the new line to start? If so, then the above is most likely your problem. Note the vsftpd ftp server on UNIX deliberately mis-implements the ASCII file transfer. It actually does a BINARY transfer, which messes up the line endings. And you will get this result when doing an ftp using the z/OS ftp client from a UNIX vsftpd server. To fix vsftpd to work correctly, the /etc/vsftpd/vsftpd.conf configuration file on the UNIX side must be changed to include: ascii_upload_enable=YES ascii_download_enable=YES -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: xml files to mainframe
Tim Brown of the IBM Mainframe Discussion List IBM-MAIN@bama.ua.edu wrote on 02/17/2010 12:31:12 PM: Is there any way to transfer an xml file to the mainframe and keep the look of it. By default it wraps the entire file into large records. I want this EDIT P08145.XML1 Columns 1 00072 Command === Scroll === PAGE ** * Top of Data ** 01 ?XML VERSION=1.0 STANDALONE=YES ? 02 - DATAPACKET VERSION=2.0 03 - METADATA 04 - FIELDS 05FIELD ATTRNAME=LOCN_ID FIELDTYPE=I4 / 06FIELD ATTRNAME=SERIAL_NUM FIELDTYPE=STRING WIDTH=12 / 07FIELD ATTRNAME=POSITION FIELDTYPE=I2 / 08FIELD ATTRNAME=GROUP FIELDTYPE=I2 / 09FIELD ATTRNAME=CHANNEL FIELDTYPE=STRING WIDTH=2 / 10FIELD ATTRNAME=SOURCE FIELDTYPE=STRING WIDTH=32 / 11FIELD ATTRNAME=STARTED FIELDTYPE=DATETIME / ** Bottom of Data But after transfer I get this BROWSEP08145.XML2Line Col 001 080 Command === Scroll === PAGE * Top of Data ** ?xml version=1.0 standalone=yes? DATAPACKET Version=2. 0METADATAFIE fieldtype=i2/FIELD attrname=CHANNEL fieldtype=string WIDTH=2/FIELD ldtype=i2/FIELD attrname=CONTENT fieldtype=i2/FIELD attrname=UTC_BIAS rname=INDEX fieldtype=i2/FIELD attrname=RAW_VALUE fieldtype=i4//FIEL D attrname=INDEX fieldtype=i2/FIELD attrname=VALUE fieldtype=r8//FIE ELD attrname=VALUE fieldtype=r8//FIELDSPARAMS// FIELDFIELD attrname= IELD attrname=EVENTDETAIL fieldtype=nestedFIELDSFIELD attrname=TIME_STA nestedFIELDSFIELD attrname=TIME_STAMP fieldtype=dateTime/FIELD attrn FIELD attrname=POSITION fieldtype=i2/FIELD attrname=TIME_STAMP fieldty N_ID=6420005 SERIAL_NUM=06420005 POSITION=10 GROUP=1 CHANNEL=M SOURCE= ON=1 INDEX=1 RAW_VALUE=6012089/ROWCONFIG POSITION=1 INDEX=2 RAW_VALU What platform are you doing the FTP from? In general, if you FTP a file with end of record characters (CR/LF) to an existing MVS file, you should get what you want. Regards, John K -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: xml files to mainframe
Most likely you are originating from a *nix platform that is not sending a CR/LF to signify end of record. That is a FTP configuration option on the *nix box and there is little you can do downstream to fix the issue. There has been much discussion on this issue in the past. HTH and good luck. -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Tim Brown Sent: Wednesday, February 17, 2010 12:31 PM To: IBM-MAIN@bama.ua.edu Subject: xml files to mainframe Is there any way to transfer an xml file to the mainframe and keep the look of it. By default it wraps the entire file into large records. ..snip NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: xml files to mainframe
-Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Hal Merritt Sent: Wednesday, February 17, 2010 1:14 PM To: IBM-MAIN@bama.ua.edu Subject: Re: xml files to mainframe Most likely you are originating from a *nix platform that is not sending a CR/LF to signify end of record. That is a FTP configuration option on the *nix box and there is little you can do downstream to fix the issue. There has been much discussion on this issue in the past. HTH and good luck. Where I couldn't get it fixed, I found that I could transfer to a UNIX resident file, then use the tr command to change the bad line endings (0x0d IIRC) to good line endings of 0x15. Once I did that, I could OCOPY or even IEBGENER the data from UNIX into a z/OS legacy dataset. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html
Re: xml files to mainframe
I found I could open the file as a TXT file with Windows Notepad and simply save it back. Notepad apparently fixed the end-of-line issue. -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of McKown, John Sent: Wednesday, February 17, 2010 1:31 PM To: IBM-MAIN@bama.ua.edu Subject: Re: xml files to mainframe -Original Message- From: IBM Mainframe Discussion List [mailto:ibm-m...@bama.ua.edu] On Behalf Of Hal Merritt Sent: Wednesday, February 17, 2010 1:14 PM To: IBM-MAIN@bama.ua.edu Subject: Re: xml files to mainframe Most likely you are originating from a *nix platform that is not sending a CR/LF to signify end of record. That is a FTP configuration option on the *nix box and there is little you can do downstream to fix the issue. There has been much discussion on this issue in the past. HTH and good luck. Where I couldn't get it fixed, I found that I could transfer to a UNIX resident file, then use the tr command to change the bad line endings (0x0d IIRC) to good line endings of 0x15. Once I did that, I could OCOPY or even IEBGENER the data from UNIX into a z/OS legacy dataset. -- John McKown Systems Engineer IV IT Administrative Services Group HealthMarkets(r) 9151 Boulevard 26 * N. Richland Hills * TX 76010 (817) 255-3225 phone * (817)-961-6183 cell john.mck...@healthmarkets.com * www.HealthMarkets.com Confidentiality Notice: This e-mail message may contain confidential or proprietary information. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message. HealthMarkets(r) is the brand name for products underwritten and issued by the insurance subsidiaries of HealthMarkets, Inc. -The Chesapeake Life Insurance Company(r), Mid-West National Life Insurance Company of TennesseeSM and The MEGA Life and Health Insurance Company.SM -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html NOTICE: This electronic mail message and any files transmitted with it are intended exclusively for the individual or entity to which it is addressed. The message, together with any attachment, may contain confidential and/or privileged information. Any unauthorized review, use, printing, saving, copying, disclosure or distribution is strictly prohibited. If you have received this message in error, please immediately advise the sender by reply email and delete all copies. -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO Search the archives at http://bama.ua.edu/archives/ibm-main.html