View previous topic :: View next topic
|
Author |
Message |
Huan-Nguyen
New User
Joined: 17 Jan 2006 Posts: 17
|
|
|
|
Hi,
I have a VSAM file , lenght of record around 200 bytes , In position such as 50 till 54 that contain spaces. Can I use DF Sort to change the position (50-54) from spaces to zeroes binary (X'00000000') for all records in that VSAM file ? Thanks, |
|
Back to top |
|
|
MGIndaco
Active User
Joined: 10 Mar 2005 Posts: 432 Location: Milan, Italy
|
|
|
|
Yes you can using altseq function. Try to search about it in this forum!
I suggest you to do it from vsam to seq.
I hope in this help. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
It's NOT a good idea to use the same file for input and output. It would be better to use another VSAM file for output or use an intermediate file for output and then copy that file back to the original VSAM file. For example:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=.... VSAM file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=... VSAM file
//TOOLIN DD *
COPY FROM(IN) TO(T1) VSAMTYPE(F) USING(CTL1)
COPY FROM(T1) TO(OUT)
/*
//CTL1CNTL DD *
OUTREC OVERLAY=(50:5Z)
/*
|
50:5Z gives you 5 binary zeros in 50-54. |
|
Back to top |
|
|
Huan-Nguyen
New User
Joined: 17 Jan 2006 Posts: 17
|
|
|
|
To MGIndaco : Thanks, I did it , but I would like to find a new way using DFSORT to update in place Vsam file .
To Frank : Your idea is great, thank you very much for help me out . Many thanks to both of you !!! |
|
Back to top |
|
|
|