IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

update VSAM file with the number of records through JCL


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
s.rajashankar

New User


Joined: 20 Nov 2009
Posts: 4
Location: chennai

PostPosted: Thu Aug 12, 2010 11:59 am
Reply with quote

HI,

my requirement is that i have to count the number of records from the input file and update the value in the vsam file,

Conditions:
1. Input is Flat file
2. output is VSAM file
3. output should have one record, in that two fields
Quote:
,one is key that is some XY from the input file and second field
should be the number of records

Please note no prog change, only one step, only into vsam file

Expected output(ex: say 26 records in the input file and XY in all the records which is location)
xy 26

Can this be done ?
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 12, 2010 12:04 pm
Reply with quote

s.rajashankar wrote:
Can this be done ?
Yes
Back to top
View user's profile Send private message
s.rajashankar

New User


Joined: 20 Nov 2009
Posts: 4
Location: chennai

PostPosted: Thu Aug 12, 2010 12:07 pm
Reply with quote

how??????????? can you code it
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 12, 2010 12:13 pm
Reply with quote

Which sort product do you use.

To find out which product and release level you have installed please run the job below and post the full sysout including the message codes.
Code:
//SORTSTEP EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD *
ABC
//SORTOUT  DD SYSOUT=*
//SYSIN    DD *
  SORT     FIELDS=COPY
Back to top
View user's profile Send private message
s.rajashankar

New User


Joined: 20 Nov 2009
Posts: 4
Location: chennai

PostPosted: Thu Aug 12, 2010 12:40 pm
Reply with quote

hi,

i submitted the job you have given and my sysout are below


1ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 01:57 ON THU AUG 12, 2010 -
0 SORT FIELDS=COPY
ICE201I F RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 E9-K90013 C9-BASE E5-K44563 E7-K44563
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 TSAMPLE .SORTSTEP. , INPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB2
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE751I 1 EF-K49534 F0-K49037 E8-K44563
ICE090I 0 OUTPUT LRECL = 80, BLKSIZE = 80, TYPE = FB
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 1, OUT: 1
ICE052I 0 END OF DFSORT
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 12, 2010 12:49 pm
Reply with quote

OK, this is what I have used in the past.
Code:
//ICETOOL  EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//IN1      DD DSN=input_data_set,DISP=SHR                         
//OUT      DD DSN=&&TEMP01,DISP=(,PASS),                         
//            SPACE=(TRK,(15,15),RLSE)                           
//OUFILE   DD SYSOUT=*                                           
//TOOLIN   DD *                                                   
  COPY FROM(IN1) TO(OUT) USING(CTL1)                             
//CTL1CNTL   DD *                                                 
  OPTION COPY                                                     
  OUTFIL FNAMES=OUFILE,REMOVECC,NODETAIL,TRAILER1=('XY',3X,COUNT)
You may have to search the forum for writing out to a VSAM cluster, or to amend the actual format of the output, but this works for me.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Aug 12, 2010 1:03 pm
Reply with quote

Please DO NOT post your question on multiple forums.
Back to top
View user's profile Send private message
s.rajashankar

New User


Joined: 20 Nov 2009
Posts: 4
Location: chennai

PostPosted: Thu Aug 12, 2010 5:57 pm
Reply with quote

Thank you very much for your support, but i was unable to do that in a single step i had done through two steps as below, step s1 to find count and step2 to repro from flat file to vsam file



//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DISP=SHR,DSN=PMGT.X.GTP444.IP.TO.GTP410
//SORTOUT DD DSN=TMGT.X.TEST.COUNT.FILE,
// DISP=(NEW,CATLG,DELETE),
// DCB=*.SORTIN,
// SPACE=(CYL,(2,1),RLSE)
//*
//SYSIN DD *
INCLUDE COND=(5,1,BI,EQ,C'2')
SORT FIELDS=COPY
OUTFIL REMOVECC,NODETAIL,
TRAILER1=('XY',COUNT=(M11,LENGTH=8))
/*
//**************************************************************
//* REPRO INTO A VSAM FILE
//**************************************************************
//S2 EXEC PGM=IDCAMS,
// REGION=4M,
// COND=(0,NE)
//*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//*
//INFILE DD DSN=TMGT.X.TEST.COUNT.FILE,
// DISP=SHR
//*
//OUTFILE DD DSN=TMGT.RXS.TEST.VSAM.FILE,DISP=(MOD,CATLG,KEEP)
//*
//SYSIN DD DSN=SCLM.PRODM.IDCPARM(GTREPRO),DISP=SHR
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Aug 12, 2010 11:09 pm
Reply with quote

Why do you think you need to use a second step to "REPRO" the file? DFSORT can write directly to a VSAM output file. Just point SORTOUT of step S1 to the VSAM output file.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 7
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts Compare only first records of the fil... SYNCSORT 7
Search our Forums:

Back to Top