MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

display the records processed in Syncsort & Culprit

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Feb 17, 2009 5:40 pm    Post subject: display the records processed in Syncsort & Culprit Reply with quote

Members,

I have a requirement wherein I have to read a VSAM file record by record and based on my conditons i will process only certain records
and finally i am writing down as below , basically i have to give the count of the records written to an output file / spool.
Code:

TOTAL NUMBER OF RECORDS READ:      X
TOTAL NUMBER OF RECORDS WRITTEN:   Y


I have done the solution by using a program and it went fine.I am very new to SYNCSORT ,FILE-AID in batch and CULPRIT.

Can anyone help me with the solutions in SYNCSORT and File-AID, always the first record in the file should not be considered for reading i mean we can omit it as it contains only header contents and we should be considering for records from second one till end.It would be great if i can get some help on Culprit.I also guess that we can do this by executing file aid online but not sure how to get the display of count as a file / sent to spool.
Back to top
View user's profile Send private message
yadav2005
Intermediate


Joined: 10 Jan 2005
Posts: 348
Topics: 144

PostPosted: Tue Feb 17, 2009 6:18 pm    Post subject: Reply with quote

We have only Files in our project in our shop and we do not have any databases.I was told that there are VSAM files and they are all
compressed and we have to uncompress them while we read / make use of it.I would like to understand what do we mean by compressing files
and basically what is the purpose of using that kind of architecture.What is happening is my program which is supposed to read the
VSAM file is not reading the file itself , can anyone help me understand in this regard.
Back to top
View user's profile Send private message
samlwho
Beginner


Joined: 08 Feb 2007
Posts: 21
Topics: 2

PostPosted: Wed Feb 18, 2009 11:05 am    Post subject: Reply with quote

Here is a two-step Syncsort solution -

Step One -
Create two input files using the OMIT and INCLUDE verbs:

--> OMIT HEADER and write output file that only contains the total number of records minus the header, which is identified by a space in column 16 of the input file.

--> INCLUDE all records based on predefined criteria (in this example each occurence of the word 'NEW VEHICHLE' in position 213 is totaled.

Code:

//STEP01   EXEC PGM=SORT,COND=(0,LT)                                   
//*                                                                   
//SYSIN    DD *                                                       
 SORT FIELDS=COPY                                                     
 OUTFIL FNAMES=SORTOUT1,NODETAIL,REMOVECC,                             
        OMIT=(016,001,CH,EQ,C' '),                                     
        TRAILER1=('TOTAL NUMBER OF RECORDS READ    :',COUNT)           
                                                                       
 OUTFIL FNAMES=SORTOUT2,NODETAIL,REMOVECC,                             
        INCLUDE=(213,011,CH,EQ,C'NEW VEHICLE'),                       
        TRAILER1=('TOTAL NUMBER OF RECORDS WRITTEN :',COUNT)           
//*                                                                   
//SORTIN   DD DSN=VSAM.INPUT.FILE,DISP=SHR                             
//SORTOUT1 DD DSN=TOTAL.READ.OUTFILE,DISP=(NEW,CATLG,DELETE)           
//SORTOUT2 DD DSN=TOTAL.WRITTEN.OUTFILE,DISP=(NEW,CATLG,DELETE)       
//*                                                                   
//SYSPRINT DD SYSOUT=*                                                 
//SYSUDUMP DD SYSOUT=*                                                 
//SYSOUT   DD SYSOUT=*                                                 


Step Two
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group