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

How to insert a value into VSAM file through SORT


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Rajendra Kumar

New User


Joined: 26 Jun 2009
Posts: 13
Location: Hyderabad

PostPosted: Fri Jun 26, 2009 3:18 pm
Reply with quote

Hi,

I want to insert a value(say "9") into one of the VSAM file through SORT.

The VSAM file is of length 105...I want to insert all 9's,basically 105(hunderd & five) 9's into the VSAM file.

The VSAM output file should have the record as "99999999999999999999999999999999999......105 9"s".

Can somebody help me out for this logic.
Back to top
View user's profile Send private message
genesis786

Active User


Joined: 28 Sep 2005
Posts: 210
Location: St Katherine's Dock London

PostPosted: Fri Jun 26, 2009 3:37 pm
Reply with quote

try ...

Code:

//STEP2 EXEC PGM=SORT                                           
//SYSPRINT DD SYSOUT=*                                         
//SYSOUT DD SYSOUT=*                                           
//SORTIN   DD *                                                 
DUMMY RECORD                                                   
//SORTOUT DD DSN=YOUR.VSAM.KSDS,DISP=OLD
//SYSIN DD *                                                   
  SORT FIELDS=COPY                                             
  OUTREC FIELDS=(105C'9')                                     
/*                                                             
Back to top
View user's profile Send private message
Rajendra Kumar

New User


Joined: 26 Jun 2009
Posts: 13
Location: Hyderabad

PostPosted: Fri Jun 26, 2009 4:09 pm
Reply with quote

Thanks a lot it is working.......

Previously,I had also tried with the same logic but the only mistake which I had done was i had coded as

SORTIN DD DUMMY

instead of

SORTIN DD *
DUMMY RECORD

so the Job was abending with ABEND=S000 U0016

Anyway,once again Thx....
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Need help for File Aid JCL to extract... Compuware & Other Tools 23
Search our Forums:

Back to Top