Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

DFSORT/ICETOOL :: Update the Sortout file with record count at defined pos

$
0
0
Author: karthik_sripal
Subject: Update the Sortout file with record count at defined pos
Posted: Tue May 17, 2016 8:59 pm (GMT 5.5)

Hello,

I would like to the count the number of records in sortin and update the record count at a certain posistion in the sortout file.

I am currently using
Code:

//STEP01 EXEC PGM=SORT
//*                                                                     
//SORTIN   DD  *                                                       
10                                                                     
20                                                                     
30                                                                     
40                                                                     
/*                                                                     
//SORTOUT  DD  DSN=Test.sort.out.ps,DISP=SHR                   
//*                                                                     
//SYSIN    DD  *                                                       
   SORT FIELDS=COPY                                                     
   OUTFIL REMOVECC,NODETAIL,                                           
    TRAILER1=('NO OF RECORDS: ',COUNT=(M11,LENGTH=8))                   
//*                                                                     
//SYSPRINT DD  SYSOUT=*                                                 
//SYSOUT   DD  SYSOUT=*                                                 
//SYSUDUMP DD  SYSOUT=*   


But - This sort card wipes out all the contents of the file I have in Test.sort.out.ps and prints the trailer line only whereas I would like to retain the content of the sortout file but only change a particular record and update it with record count from sortin.

How could I acheive this ? Thank you for your help!

P:S- I have this also cross posted in the synsort forum - Sorry to duplicate if it appears so - I just want to try the ask in both the products section for solution.


Viewing all articles
Browse latest Browse all 9405

Trending Articles