Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Where to get sample for processing RM... vice_versa PL/I & Assembler 2 Tue Jan 16, 2018 2:03 pm
No new posts VSAM dataset not found abdulrafi JCL & VSAM 5 Fri Jan 12, 2018 11:19 am
No new posts COB2 file processing rizwanaccy COBOL Programming 8 Tue Jan 02, 2018 1:00 pm
No new posts KSDS and Index file in cobol deepak14450 COBOL Programming 9 Fri Dec 22, 2017 9:36 am
No new posts Preserve order in Input File pshongal DFSORT/ICETOOL 13 Thu Dec 21, 2017 4:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us