View previous topic :: View next topic
|
Author |
Message |
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
Friends,
I need to take backup of a VSAM file which contains more than 250 columns.
I am trying to use VPRINT command to take backup, but the data gets truncated to only certain cols. Data gets truncated.
I allocated the dataset with the LRECL(255) and then tried the VPRINT. Still the data doesnt gets backed up.
How can i take backup.
Any suggestions techies... |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
techies,
I found the LRECL defined for File-aid to be of default 133, is there any way you can suggest me to take the backup |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
I know I am being picky, but..
the column concept is related only to relational dbms
I would rather speak about fields
and .... I am no fileaid expert but VPRINT looks more like a printing tool
rather than a backup tool
for such task there many other options better suited for it
for example
HSM hbackup command
IDCAMS repro
SORT copy
FILEAID ????
DFDSS/ADRDSSU
just choose one |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Who/what provided the direction to use VPRINT for a backup? What kind of backup do you expect from vprint?
If we better understand your requirement, we may be able to offer other suggestions. |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
Techies,
I need the data in the form of report. To be more specific, i need data of all the cols.
The problem is i am trying to take the data in report form using VPRINT option, the data is getting truncated.
If i sort and do an FTP the data in packed format is not coming out as expected.
How to proceed ?
Do i need to write one cobol/ezt to do the functionality.
(or)
Is there any EZT program to generate a report converting the packed attributes to numeric ones ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
It sounds like you may simply need to read the existing file and create a new file that is easily readable by the eyes (rather than code). Why is such a file needed?
However;
Quote: |
converting the packed attributes to numeric ones |
Packed decimal is numeric. . .
When you say "more than 250 columns", do you mean lrecl=250+?
You could probably use cobol, ezt, your sort product, or some other utility to reformat the records and make the new file lrecl as long as it needs to be.
If you show some sample input data and the desired output from that input, we can probably offer better suggestions. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10882 Location: italy
|
|
|
|
being picky again
just take a decision and carry it on until the end
Your initial post was about a backup, now about producing a report
for reports the common and most used record length is, guess what?, 133
so no wonder that Your report does not fit
If You need to transfer the data to a PC, You do not need a report,
You just need an all character representation of Your data
use a different tool to just flatten out ( from packed, binary ) the numerics
and transfer the resulting file to the pc |
|
Back to top |
|
|
diwa_thilak
Active User
Joined: 13 Jul 2006 Posts: 205 Location: At my desk
|
|
|
|
Thanks Enrico,Dick,
Yup you are right Enrico, All i need to see the data in the form of Excel.
That is need to download the records from VSAM file into a flat file.
Detailed explanation.
I have a VSAM file its LRECL is 255 (around 30 cols) and i just browse the file(VSAM) using File-Aid(VFMT) format.
And i give VPRINT option to print the data horizontally so that i could take the same in Excel using FTP.
But File-Aid seems to have an constraint that not more than 133 LRECL i can extract. So data gets truncated.
But i can extract the data vertically, but formating and loading the data in excel becomes tedious.
If i sort into a PS, the packed decimal in the VSAM gets converted into JUNK character in PS. I could not able to load the data into PS.
Is there any other way i can retrieve the data from VSAM into an Excel ? |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Yes, you could read the vsam data into a little cobol program that uses the existing copybook, move the non-displayable numbers to edited fields (i.e. zz,zz9.99-) which are redefined as pic x(n), and STRING all of the fields delimited by x'05' (tab) into a new output record and then write the new record.
The new ps file will be easy to ftp to some win-based target and will open directly into excel with no other manipulation. |
|
Back to top |
|
|
|