Viewing Line Item Objects when retrieved with ARSDOC GET

Previous topic - Next topic

rstockton

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

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

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

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.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

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

rstockton


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

It should be possible to run a little script on the server after extraction to clean that up. 

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

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

Alessandro Perucchi

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

#!/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

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