|
View previous topic :: View next topic
|
| Author |
Message |
ibmbansal08
New User
Joined: 31 Jul 2012 Posts: 6 Location: India
|
|
|
|
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 -->
8
9
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 |
|
 |
knickraj Warnings : 1 New User

Joined: 11 Jun 2007 Posts: 50 Location: Euro
|
|
|
|
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 |
|
 |
ibmbansal08
New User
Joined: 31 Jul 2012 Posts: 6 Location: India
|
|
|
|
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 |
|
 |
vasanthz
Global Moderator

Joined: 28 Aug 2007 Posts: 1753 Location: Tirupur, India
|
|
|
|
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.
Brace yourself |
|
| Back to top |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
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 |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|