Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
XML file parsing problem

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
ibmbansal08

New User


Joined: 31 Jul 2012
Posts: 6
Location: India

PostPosted: Fri Aug 03, 2012 10:53 am    Post subject: XML file parsing problem
Reply with quote

Hi,
I have a requirement for which i am looking for the solution.

"Reqt is to create a DFSORT jcl which read the xml data and creates a PS (sequential file)".
It is supposed to read the content between start and end tags of
Code:
<country>,<onshore>,<startdate>,<enddate>,<offeringname>,<variantname>,<costvalue>,<costtype>,<pricetype>
and write in the PS file.

Output PS file will look like :
Code:
CN  true  2010-10-22 2015-12-31 9076  FUP   1001 USD  TMC PUR

XML file is like:
Code:
"<?xml version=""1.0"" encoding=""UTF-8"" ?>
2 <wwprttxn type=""cost"" id=""99999999""
3         xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
4         xsi:noNamespaceSchemaLocation=""cost.xsd"">
5         <!-- 
6                 Estimated Cost elements with price point
7     -->


10         <!--
11                 ZIPS Total Manufacturing Cost for China, on a Feature Upgrade Offering
12         -->
13         <cost type=""I"" xsi:type=""costElementType"">
14                 <country>CN</country>
15                 <onshore>true</onshore>
16                 <startdate>2010-10-22</startdate>
17                 <enddate>2015-12-31</enddate>
18                 <offeringname>9076</offeringname>
19                 <varianttype>FUP</varianttype>
20                 <variantname>1001_1002</variantname>
21                 <costvalue uom=""USD"">130.23</costvalue>
22                 <costtype>TMC</costtype>
23                 <pricetype>PUR</pricetype>
24         </cost>"


Please suggest the solutions of this reqt and share the complete DFSORT jcl with me.

Thanks,
Nimish

Code'd
Back to top
View user's profile Send private message

knickraj
Warnings : 1

New User


Joined: 11 Jun 2007
Posts: 50
Location: Euro

PostPosted: Fri Aug 03, 2012 12:59 pm    Post subject:
Reply with quote

you may try something like this..

use when group begin ,end to select records, then use a parse.

Code:
INREC IFTHEN=(WHEN=GROUP,                               
BEGIN=(?,?,CH,EQ,C'<COUNTRY>'),                         
END=(?,?,CH,EQ,C'<PRICETYPE>'),                         
PUSH=(81:ID=1))                                         
OUTFIL PARSE=(%00=(STARTAFT=C'>',ENDBEFR=C'<',FIXLEN=?)
INCLUDE=(81,1,CH,NE,C' '),
Back to top
View user's profile Send private message
ibmbansal08

New User


Joined: 31 Jul 2012
Posts: 6
Location: India

PostPosted: Fri Aug 03, 2012 2:49 pm    Post subject: Reply to: XML file parsing problem
Reply with quote

Hi,

Can you provide me the full JCL.I will change the input file accordingly.

Also provide me the result of this one.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1532
Location: Chennai

PostPosted: Fri Aug 03, 2012 3:04 pm    Post subject:
Reply with quote

Hello,
Asking for a full code is same as asking someone else to do your job for you with no pay of course.
Many of us here like to help people who tried something out and stuck at some point. "give me full code" repels help.

Show us what you have tried and if you are stuck at some point, we will be ready to help.
Quote:
Employer:IBM
Brace yourself
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6970
Location: porcelain throne

PostPosted: Fri Aug 03, 2012 4:58 pm    Post subject:
Reply with quote

it seems as if most of he Thread Starters,
especially those who want us to do all the work,
work for consultant firms (like ibm).

it seems that members who work for a company
that is not in the business of charging others to do their work
have fewer requirements and are less demanding.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving a PS file as body of a mail! Vignesh Sid JCL & VSAM 4 Tue Nov 21, 2017 9:23 pm
No new posts unable to set RC = 4 when empty file migusd SYNCSORT 1 Tue Nov 21, 2017 1:21 am
No new posts VBS and VB, COBOL syntax is the same ... natt.sut COBOL Programming 3 Sun Nov 12, 2017 6:36 am
No new posts Having a problem FTP'ng to the MF pahiker All Other Mainframe Topics 2 Fri Nov 10, 2017 8:20 pm
No new posts Updating data from one file to other!!! Vignesh Sid SYNCSORT 1 Mon Nov 06, 2017 2:42 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us