Author Topic: Viewing Line Item Objects when retrieved with ARSDOC GET  (Read 4020 times)

rstockton

  • Guest
Viewing Line Item Objects when retrieved with ARSDOC GET
« on: July 16, 2013, 01:51:56 PM »
When I use ARSOC to GET line item reports the data is zigzagged across the screen when I open the output file.  I can open it with TEXTPAD but it is just one long line of data, I can click on REfORMAT and  it appears as it should.  Does anyone know how I can make these readable without going through all of these processes?  I am retrieving over 3,000 files and Notpad, Wordpad etc. does not work.

Following is my ARSDOC command (with important information x'ed out).

nohup /usr/lpp/ars/bin/arsdoc get -h xxxxx -u xxxx -p xxxxxxx  -f "xxxxxxxxx" -i "WHERE (RPDATE > "14610" and RPDATE < "14990") and (RPSUBID = 'xxxxxxxxx') and (RPPRVID = 'xxxxxxxxx')" -v -o FindReports-14610-14690 -d /arsacif/load5/ &

Thanks,
Russell

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #1 on: July 17, 2013, 03:38:56 AM »
Hello Russel,

Well... it all depends on the format of the texts itself.

What is the view configuration of the application associated with these files?

Sincerely yours,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

rstockton

  • Guest
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #2 on: July 17, 2013, 08:57:09 AM »
Alessandro,

The View Information is -  Data Type = Line, RECFM = Fixed - LRECL = 192, CC = NO, CCType = ANSI

View is  correct on Retireval using the OD Client

Thanks,
Russell

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2234
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #3 on: July 18, 2013, 06:15:29 AM »
Hi Russell.

PC's don't have the concept of 'record lengths' like mainframes do.  You'll need to do some sort of conversion in order to insert line ending characters so that the files can be properly displayed on PCs.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

rstockton

  • Guest
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #4 on: July 18, 2013, 09:18:18 AM »

There are 2 options that I found which open the files so the information is lined up correctly when viewed, but both require extra steps (notepad, wordpad etc. do not work).

One that I mentioned earlier is TextPad with Reformat, and another is Sublime Text 2 both open the text but are cumbersome to use when viewing 3000+ documents.


Thanks,

Russell

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2234
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #5 on: July 19, 2013, 06:07:01 AM »
It should be possible to run a little script on the server after extraction to clean that up. 

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Viewing Line Item Objects when retrieved with ARSDOC GET
« Reply #6 on: July 26, 2013, 08:58:07 AM »
Hello Russel,

Well then you need to have a script like that if the record of a line is always 192 characters, and from what I see you are in Unix (AIX)

Your exported text file is called raw.txt

Code: [Select]
#!/usr/bin/perl
use strict;
use warnings;

my $length = $ARGV[0];
my $fileName = $ARGV[1];

open my $file, "<:raw", $fileName or die "Couldn't open $fileName!";

my $somebyte;
while (read($file,$somebyte,$length)) {
    next if $somebyte=~/^$/;
    print $somebyte."\n";
}

close $file;

and you call it like transformtext.pl

Code: [Select]
transformtext.pl 192 raw.txt
and it should do the trick on the terminal output, then you redirect it into another file, and it should be ok.

I suppose that you are using a "ISO8859-X" format, one byte per character. If you are using something else... then this code is broken! :-)

I hope that helps a little bit.

Sincerely yours,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML