Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to Print File content using FileAid

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools
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    Post subject: How to Print File content using FileAid
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: 3158
Location: Tucson AZ

PostPosted: Fri May 25, 2007 3:59 pm    Post subject:
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

Site Director


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

PostPosted: Fri May 25, 2007 10:28 pm    Post subject:
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon May 28, 2007 4:31 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> Compuware & Other Tools All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us