IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Can I use DF Sort for VSAM file.


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Huan-Nguyen

New User


Joined: 17 Jan 2006
Posts: 17

PostPosted: Tue Jan 17, 2006 8:03 am
Reply with quote

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
View user's profile Send private message
MGIndaco

Active User


Joined: 10 Mar 2005
Posts: 432
Location: Milan, Italy

PostPosted: Tue Jan 17, 2006 5:03 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Jan 17, 2006 9:19 pm
Reply with quote

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
View user's profile Send private message
Huan-Nguyen

New User


Joined: 17 Jan 2006
Posts: 17

PostPosted: Wed Jan 18, 2006 7:05 am
Reply with quote

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 !!! icon_biggrin.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
Search our Forums:

Back to Top