XBRL Generated Using put statement

Reply
Frequent Contributor
Posts: 87

XBRL Generated Using put statement

I am using the following code to generate an XBRL file

Here i am creating macros and using in programs

I have attached output generated

I want to know is it correct format of XBRL or

any other way to generate

Filename outxml "path/xbrl_sample.xml";
data _null_;
file outxml; /*XML Output File */
put '<?xml version="1.0" encoding="UTF-8" ?>' ;
put '<xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ref="http://www.xbrl.org/2004/ref" xmlns:xbrldt="http://xbrl.org/2005/xbrldt"
xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:in-XXX-rep="http://www.xbrl.in/XXX/pbg/2009-02-06">';
put  '<link:schemaRef xlink:type="simple" xlink:href="in-XXX-rep-2009-02-06.xsd" />';
put '<xbrli:context id="'&asdate'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>' ;
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>';
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&OneMonth'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-repSmiley SurprisedneMonth</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>' ;
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&TwoMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:TwoMonths</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>';
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&ThreeMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>' ;
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:ThreeMonths</xbrldi:explicitMember>';
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>';
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&FourMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:FourMonths</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>' ;
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&FiveMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:FiveMonths</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>';
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&SixMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-repSmiley FrustratedixMonths</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>';
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:context id="'&ExceedingSixMonths'">';
put '<xbrli:entity>';
put  '<xbrli:identifier scheme="'&datelink'">712</xbrli:identifier>';
put '<xbrli:segment>';
put  '<xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:ExceedingSixMonths</xbrldi:explicitMember>' ;
put  '</xbrli:segment>';
put  '</xbrli:entity>';
put '<xbrliSmiley Tongueeriod>';
put  '<xbrli:instant>' "&DATEY" '</xbrli:instant>' ;
put  '</xbrliSmiley Tongueeriod>';
put  '</xbrli:context>';
put '<xbrli:unit id="USD">';
put  '<xbrli:measure>iso4217:USD</xbrli:measure>' ;
put  '</xbrli:unit>';
put '<xbrli:unit id="INR">';
put  '<xbrli:measure>iso4217:INR</xbrli:measure>' ;
put  '</xbrli:unit>';
put  '<in-XXX-rep:Version contextRef="'&asdate'">V1.0</in-XXX-rep:Version>' ;
put  '<in-XXX-rep:ForeignCurrencyBalances contextRef="'&asdate'" unitRef="USD" precision="INF">' "&FCY" '</in-XXX-rep:ForeignCurrencyBalances>' ;
put  '<in-XXX-rep:NetOpenExchangePosition contextRef="'&asdate'" unitRef="INR" precision="INF">' "&NET" '</in-XXX-rep:NetOpenExchangePosition>' ;
put  '<in-XXX-rep:NetOpenExchangePositionDomesticCurrency contextRef="'&asdate'" unitRef="INR" precision="INF">' "&FCYINR" '</in-XXX-rep:NetOpenExchangePositionDomesticCurrency>' ;
put  '<in-XXX-rep:AggregateGapLimitMaintained contextRef="'&asdate'" unitRef="USD" precision="INF">' "&AGL" '</in-XXX-rep:AggregateGapLimitMaintained>' ;
put  '<in-XXX-rep:ValueatRiskMaintained contextRef="'&asdate'" unitRef="INR" precision="INF">' "&VAR" '</in-XXX-rep:ValueatRiskMaintained>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&OneMonth'" unitRef="USD" precision="INF">' "&one" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&TwoMonths'" unitRef="USD" precision="INF">' "&two" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&ThreeMonths'" unitRef="USD" precision="INF">' "&three" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&FourMonths'" unitRef="USD" precision="INF">' "&four" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&FiveMonths'" unitRef="USD" precision="INF">' "&five" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&SixMonths'" unitRef="USD" precision="INF">' "&six" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>' ;
put  '<in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="'&ExceedingSixMonths'" unitRef="USD" precision="INF">' "&seven" '</in-XXX-rep:ForeignCurrencyMaturityMismatch>';
put  '</xbrli:xbrl>';
end;
run;

Output generated

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

- <xbrli:xbrl xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:link="http://www.xbrl.org/2003/linkbase"

xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ref="http://www.xbrl.org/2004/ref" xmlns:xbrldt="http://xbrl.org/2005/xbrldt"

xmlns:xbrldi="http://x brl.org/2006/xbrldi" xmlns:iso4217="http://www.xbrl.org/2003/iso4217" xmlns:in-XXX-rep="http://www.xbrl.in/XXX/bpg/2009-02-06">

  <link:schemaRef xlink:type="simple" xlink:href="in-XXX-rep-2009-02-06.xsd" />

- <xbrli:context id="asof_20130527">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.xxx.xxx.in/712/2013-05-27">712</xbrli:identifier>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_OneMonth">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.xxx.xxx.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-repSmiley SurprisedneMonth</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_TwoMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.xxx.xxx.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:TwoMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_ThreeMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.XXX.gov.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:ThreeMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_FourMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.XXX.gov.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:FourMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_FiveMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.XXX.gov.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:FiveMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_SixMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.XXX.gov.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-repSmiley FrustratedixMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:context id="asof_20130527_ExceedingSixMonths">

- <xbrli:entity>

  <xbrli:identifier scheme="http://www.XXX.gov.in/712/2013-05-27">712</xbrli:identifier>

- <xbrli:segment>

  <xbrldi:explicitMember dimension="in-XXX-rep:CurrencyMismatchDurationDimension">in-XXX-rep:ExceedingSixMonths</xbrldi:explicitMember>

  </xbrli:segment>

  </xbrli:entity>

- <xbrliSmiley Tongueeriod>

  <xbrli:instant>2013-05-27</xbrli:instant>

  </xbrliSmiley Tongueeriod>

  </xbrli:context>

- <xbrli:unit id="USD">

  <xbrli:measure>iso4217:USD</xbrli:measure>

  </xbrli:unit>

- <xbrli:unit id="INR">

  <xbrli:measure>iso4217:INR</xbrli:measure>

  </xbrli:unit>

  <in-XXX-rep:Version contextRef="asof_20130527">V1.0</in-XXX-rep:Version>

  <in-XXX-rep:ForeignCurrencyBalances contextRef="asof_20130527" unitRef="USD" precision="INF">12456589.00</in-XXX-rep:ForeignCurrencyBalances>

  <in-XXX-rep:NetOpenExchangePosition contextRef="asof_20130527" unitRef="INR" precision="INF">12345678.00</in-XXX-rep:NetOpenExchangePosition>

  <in-XXX-rep:NetOpenExchangePositionDomesticCurrency contextRef="asof_20130527" unitRef="INR" precision="INF">98765432.00</in-XXX-rep:NetOpenExchangePositionDomesticCurrency>

  <in-XXX-rep:AggregateGapLimitMaintained contextRef="asof_20130527" unitRef="USD" precision="INF">12365523.00</in-XXX-rep:AggregateGapLimitMaintained>

  <in-XXX-rep:ValueatRiskMaintained contextRef="asof_20130527" unitRef="INR" precision="INF">917900.00</in-XXX-rep:ValueatRiskMaintained>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_OneMonth" unitRef="USD" precision="INF">-12345678.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_TwoMonths" unitRef="USD" precision="INF">12345678.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_ThreeMonths" unitRef="USD" precision="INF">13597862.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_FourMonths" unitRef="USD" precision="INF">54623189.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_FiveMonths" unitRef="USD" precision="INF">-47813596.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_SixMonths" unitRef="USD" precision="INF">471258936.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  <in-XXX-rep:ForeignCurrencyMaturityMismatch contextRef="asof_20130527_ExceedingSixMonths" unitRef="USD" precision="INF">-96325874.00</in-XXX-rep:ForeignCurrencyMaturityMismatch>

  </xbrli:xbrl>

Super Contributor
Posts: 282

Re: XBRL Generated Using put statement

Hi,

To check if it is the correct format you could try using a validation tool. For example I found an online tool:

XBRL Company Accounts Validator

I assume it is the kind of validation you are looking for.

Regards,

Amir.

Frequent Contributor
Posts: 87

Re: XBRL Generated Using put statement

Thanks Amir

I got some errors trying to resolve it

Ask a Question
Discussion stats
  • 2 replies
  • 1186 views
  • 3 likes
  • 2 in conversation