Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to insert a value into VSAM file through SORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to insert a value into VSAM file through SORT
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    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us