IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to Print File content using FileAid


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sheetal_g

New User


Joined: 09 May 2007
Posts: 3
Location: india

PostPosted: Fri May 25, 2007 1:45 pm
Reply with quote

Hi

My requirement is to print file content(file lrecl= 300 bytes)
to word doc or excel.
I tried VPRINT option of Fileaid, But I get ?
VP001-DATA TRUNCATION OCCURRED WHILE PROCESSING YOUR VPRINT REQUEST.? Message .
My aim was to copy this SYSPRINT to dataset and then FTP.
But Data truncation is happening in sysprint itself.

(it should also be mapped with corresponding layout so that I need to see value of comp variables too)

I had used below JCL to get sysprint

//JS010 EXEC PGM=FILEAID,REGION=6M
//STEPLIB DD DISP=SHR,DSN=TECHPRD.COMPWARE.FA.V8R9M5.LOAD
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//DD01 DD DSN= PS file to be priented,
// DISP=SHR
//DD01RL DD DSN= PDS having corresponding record layout ,
// DISP=SHR
//SYSIN DD *
$$DD01 VPRINT SHOW=F,LAYOUT=layout member name,OUT=0,
/*
//



Thanks
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Fri May 25, 2007 3:59 pm
Reply with quote

Well if things got truncated, then 'DSN= PDS having corresponding record layout' seems to be wrong.

As far as word doc or excel goes, try to open a word doc or excel using notepad. You will not just see the contents, you will see a lot of garbage that is formatting stuff. If you can figure how to generate that stuff, you too can create a word doc or excel.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Fri May 25, 2007 10:28 pm
Reply with quote

Hello,

One way that works well is to created a delimited file on the mainframe with all of the numeric fields expanded to include the decimal point and the minus sign for negative values, ftp that file to the windows system, and open it in excel which handles delimited files quite easily.

The tab character (x'05') and the backslash (\) work well as delimiters because they are rarely in text or numeric fields.
Back to top
View user's profile Send private message
sheetal_g

New User


Joined: 09 May 2007
Posts: 3
Location: india

PostPosted: Mon May 28, 2007 1:27 pm
Reply with quote

William Thompson wrote:
Well if things got truncated, then 'DSN= PDS having corresponding record layout' seems to be wrong.

As far as word doc or excel goes, try to open a word doc or excel using notepad. You will not just see the contents, you will see a lot of garbage that is formatting stuff. If you can figure how to generate that stuff, you too can create a word doc or excel.


Thanks Thompson

I had mentioned correct INCLUDE name (having layout corresponding to the PS file to be priented)
Once i submit job i can see the file content in sysout because i had mentioned '//SYSPRINT DD SYSOUT=* ' ... i even tried to route this O/p to one new O/p DSN having lrecl = 300bytes ... BUT even than the file content is seen upto 59th position of layout and rest columns are not seen
in O/p DSN(filled with junk ).

My requirement is that .. as we map any PS file in Fileaid with corresponding Layout to see the file content (including comp var in display format) the same pattern has to be Seen in excel or word doc.

Thanks
Back to top
View user's profile Send private message
sheetal_g

New User


Joined: 09 May 2007
Posts: 3
Location: india

PostPosted: Mon May 28, 2007 1:32 pm
Reply with quote

dick scherrer wrote:
Hello,

One way that works well is to created a delimited file on the mainframe with all of the numeric fields expanded to include the decimal point and the minus sign for negative values, ftp that file to the windows system, and open it in excel which handles delimited files quite easily.

The tab character (x'05') and the backslash (\) work well as delimiters because they are rarely in text or numeric fields.


Thanks Scherrer

Sorry ..But i dont know how to create a delimited file on mainframe.
If possible can you please give me some more idea/code ..
I know to handle delimited file in Excel ... but i dont know how to create delimited file in mainframe.

Can we see the PS file comp variables in display format after mapping with corresponding file layout ?

Thanks
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon May 28, 2007 4:31 pm
Reply with quote

Hello,

In COBOL, define an "output area" that is all is long enough to accomodate all of the data to be sent to excel and STRING all of the fields interspersed with your delimiter character INTO it.

Code:
MOVE PACKED-1 TO ZONED-1.
MOVE PACKED-2 TO ZONED-2.
etc for all packed/binary fields
STRING TEXT-FIELD-1, X'05',
       ZONED-1, X'05',
       etc
   INTO OUTPUT-AREA.
WRITE EXCEL-REC FROM OUTPUT-AREA.


Text fields may be STRINGed as is - packed/binary numbers need to be moved to zoned fields before STRINGing them.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top