View previous topic :: View next topic |
Author |
Message |
kavya Beginner
Joined: 22 Sep 2005 Posts: 12 Topics: 8
|
Posted: Mon Sep 26, 2005 10:48 pm Post subject: fixed length to variable |
|
|
hi everyone i have a 20 fixed length records in a file i want to convert them to variable length records in a seperate file .... how can i do it..waiting 4 reply |
|
Back to top |
|
|
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Sep 26, 2005 11:44 pm Post subject: |
|
|
ISPF 3.2 allocate followed by ISPF 3.3 copy. However be aware that ISPF copy will remove trailing blanks from the records (which is probably what you want anyway).
ISPF copy services are also available to programs. See LMCOPY and similar services in the manuals if you need that. |
|
Back to top |
|
|
bhoja Beginner
Joined: 26 Sep 2005 Posts: 13 Topics: 4 Location: Blue Mountain Guy
|
Posted: Mon Sep 26, 2005 11:44 pm Post subject: |
|
|
Kavya,
If you have create a dataset with FB option, No way to change the dataset to VB.
For that you can copy the records using REPRO where the destination file you can mention as VB dataset. I think this may help you, Take suggestions from other guys. _________________ Thanks,
monster bhoja |
|
Back to top |
|
|
ANIL SARATHY Beginner
Joined: 30 Aug 2005 Posts: 88 Topics: 3 Location: Syracuse,New york
|
Posted: Mon Sep 26, 2005 11:44 pm Post subject: |
|
|
Try this
Code: |
//SORT EXEC PGM=SORT
//SORTIN DD DSN=INPUTFILE
//SYSIN DD *
OPTION COPY
OUTFIL FTOV
//SORTOUT DD DSN=OUTPUTFILE
//SYSOUT DD SYSOUT=*
|
_________________ Anil Sarathy |
|
Back to top |
|
|
Phantom Data Mgmt Moderator
Joined: 07 Jan 2003 Posts: 1056 Topics: 91 Location: The Blue Planet
|
Posted: Tue Sep 27, 2005 12:27 am Post subject: |
|
|
Kavya,
There are lots of ways, using which you can convert FB to VB.
1. Using SORT - See Anil_Sarathy's post above. But for this, you need to have either DFSORT or (Syncsort - released after 2000). Let us know what version of sort you have.
2. Using FileAid - Check if your shop has FileAid, then you can declare the new dataset as well as copy using FileAid. It also provides option to fill blanks or truncate after last character.
3. Using 3.2 & 3.3 copy / LMCOPY - Using REXX as Semigeezer pointed out.
You choose which ever you feel is easy / best for you.
Thanks,
Phantom |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
|
Posted: Tue Sep 27, 2005 4:42 am Post subject: |
|
|
kavya,
You can use IDCAMS/IEBGENER also to create a VB file from a FB file.
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
Frank Yaeger Sort Forum Moderator
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
|
|
Back to top |
|
|
|
|