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 IDCAMS RENAMING VSAM FILE ALONG WITH ... upendrasri JCL & VSAM 11 Tue Apr 17, 2018 10:42 pm
No new posts VSAM file NOT Found error while proce... SumaReva CICS 5 Wed Apr 11, 2018 9:54 pm
No new posts VSAM - Accessing beyond record size Benchwarmer JCL & VSAM 6 Wed Apr 11, 2018 9:20 pm
No new posts converting a mainframe file with ASA ... Lynne Schuler All Other Mainframe Topics 5 Wed Apr 04, 2018 9:44 am
No new posts Sort numeric fields with trailing spaces sancraig16 SYNCSORT 7 Tue Apr 03, 2018 1:21 am

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