View previous topic :: View next topic
|
Author |
Message |
sheetal_g
New User
Joined: 09 May 2007 Posts: 3 Location: india
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
sheetal_g
New User
Joined: 09 May 2007 Posts: 3 Location: india
|
|
|
|
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 |
|
|
sheetal_g
New User
Joined: 09 May 2007 Posts: 3 Location: india
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|