Copy records without duplicates
How to copy records from 2 files with duplicates? Without duplicates?
How do you split a file data into multiple files?
Explain with example?
Answered by: jjtharappel
Member Since Nov-2011 | Answered On : Nov 24th, 2011
Run a JCL with the below sort step
Code
//STEP1 EXEC PGM=SORT //SORTIN DD DSN=input-file-name,DISP=SHR //SORTOF01 DD DSN=output-file-name-1, // DISP=(NEW,CATLG,DELETE), // SPACE=... // LRECL=...,RECFM=FB //SORTOF02 DD DSN=output-file-name-2, // DISP=(NEW,CATLG,DELETE), // SPACE=... // LRECL=...,RECFM=FB //SORTOF03 DD DSN=output-file-name-3, // DISP=(NEW,CATLG,DELETE), // SPACE=... // LRECL=...,RECFM=FB //SYSOUT DD SYSOUT=* //SYSIN DD * SORT FIELDS=COPY OUTFIL FNAMES=SORTOF01, INCLUDE=(cond for file 1) OUTFIL FNAMES=SORTOF02, INCLUDE=(cond for file 2) OUTFIL FNAMES=SORTOF03, INCLUDE=(cond for file 3) /* //*
Run a JCL with the below sort step "jcl //STEP1 EXEC PGM=SORT //SORTIN DD DSN=input-file-name,DISP=SHR //SORTOF01 DD DSN=output-file-na...
How to read last record in vsam using cics ?
first of all we have to do
MOVE HIGH-VALUES TO KEY-NAME
AFTER
READ NEXT RECORD
DISPLAY 'RECORD'
MOVE HIGH-VALUES TO WS-KEY. EXEC CICS STARTBR FILE('LOGICALFILENAME') RIDFLD(WS-KEY) END-EXEC. EXEC CICS READNEXT FILE('LOGICALFILENAME') ...
Splitting and merging of file using sort
Hi,i have a file which contains 3 types of transactions with account number,transaction type and transaction creation date.The transaction types are 35,39 and 41.The file has duplicate records for all transactions(ie 2 records for each account number for each transaction).Now I need to remove the duplicate...
How do you read a ksds file in reverse order?
- Use STARTBR Command to point it to last record with by moving Keys to HIGH values .
-Then use READPREV to read records ...
How do you create a new vsam file with null record as header with jcl please provide me with coding
What do you mean by rdw in vsam?
Guys,As you are aware, RDW stands for Record Descriptor Award.This is the first 4 bytes in a VSAM - Variable Record Length file that stores the actual length of the record. This is hidden if you brows...
Hi,
I really appreciete your answer of this question.
Thanks
Ashutosh
Write a program the following scenarios, declare vsam ksds cluster by jcl by the following record layout?Customer info(7) comp3,customer no x(6),customer name x(20),customer address x(35),customer mail-id x(25),and load the above layout thru jcl?
How vsam datasets are cataloged?
All VSAM datasets are SMS managed. SMS managed datasets are cataloged. So while creating a vsam dataset using the IDCAMS utility the dataset is cataloged.
All VSAM datasets are SMS managed. So by the IDCAMS utility VSAM dataset is created which is cataloged..
Best way is to choose small CI size for random access and large CI size for direct access. Without specifying CISZ the defaults will be 4096 for data and 1024 for index. Remember these sizes are obtai...
1024 and 4096 are powers of 2. You could specify 1000 and 4000 but VSAM would actually use 1024 and 4096 although I'm not sure if the full 1024 would actually be available to you. Short answer is that since that is the number VSAM will use, 1000 or 4000 will not save you anything.
How to retrieve record from a flat file?
We can directly read a record from a flat file using Cobol READ command!If you want to load the flat file into a PS file use REPRO command in IDCAMS Util.If you want to load a flat file which was obta...
To retrieve record from flat file you can use IDCAMS utility with REPRO command and can copy the data into either a VSAM data set or another flat file
Explain the concept behind spanned records & shareopts ?
These options are not corrolated!Spanned record : If a CI has not enough freespace to fit in a new record, then the record is spanned to the next CI. If the next CI does not have enought freespa...
It seems fine regarding CI split. CA split also occurs in the same as CI split. But remember these two concepts comes into the picture in case of KSDS only.
Please let me know if you have any doubts.
Regards,
Ramesh.Ambadi.
Ans1) DB tables are preferred when we want to maintain relationship amoung data. If no relationship is required then we can choose any. Remeber DB2 tables are always stored in VSAM files.Ans2)Flat fil...
Difference between VSAM and Database TablesThere is a simple difference in these two is that on VSAM file we can not run the SQL queries and in VSAM files there are not any kind of...
What is the default size of the record
Answered by: nlarsensmith
Member Since May-2009 | Answered On : Dec 1st, 2010
If the record size parameter is not specified when the cluster is created, then the size is determined by the size of the Control Interval.
If the record size parameter is not specified when the cluster is created, then the size is determined by the size of the Control Interval.
What is the procedure for running the batch job in mainframe?
Friends, let me explain with an example:--EG:-Adding two numbersStep-1:- We need to compile that program and that compiled program(i.e Error free code) we need to keep in one Load Library (EG:-AB...
Prepare a RUNJCL and submit it.
What is the record size for alternate index if alternate key is unique
- whether record size is (5+alternate key length+n*pmy key length ) or (5+pmy key length + n*alternate key length) where 'n' is the no. Of duplicate alternate keys.
what i have come across,it is always 5 + alternate key length + n*primary Key length
the key for alternate index is the alternate key and in the data part we have all the related primary keys populated.
But i still do not understand how this data part get populated...:)
How will you define a ksds of avg length-100 and max length-150 and key length 10
Answered by: Yaswanth kodali
Member Since Jul-2010 | Answered On : Jul 12th, 2010
We can define the KSDS cluster by two ways by using the file-aid or by using the IDCAMS Utlity..
By using the IDCAMS utility we can define the record with average length 100 and maximum length 150 with keylength 10 starting at 0 as follows
//step01 EXEC pgm=IDCAMS
//SYSIN DD *
DEFINE CLUSTER(NAME(userid.name.sample) -
VOLUMES(MVS801) -
RECORDSIZE(100 150) -
TRACKS(10 20)
KEYS(10 0) -
INDEXED ) -
DATA ( NAME(userid.name.sample.data)) -
INDEX( NAME(userid.name.sample.index)) -
/*
//
We can define the KSDS cluster by two ways by using the file-aid or by using the IDCAMS Utlity..By using the IDCAMS utility we can define the record with average length 100 and maximum length 150 with...
How we can access the last record from ksds file ?
I dont think moving HIGH-VALUES will take you to the last record , as you need to access the record for which the key value is <= HIGH VALUES. And START KEY syntax does not allow you to search a ke...
Ya, moving low-values and high-values to key, points to the first and last records respectively. If you want to process the records of a VSAM file sequentially, use the START command.. Point the...
What is the virtual memory size for vsam?
Virtual Memory deals with Operating System and VSAM deals with access method.
Virtual memory depends on the addressing mode of the operating system.
UNION..........WITH OUT DUPLICATES
UNION ALL.........WITH DUPLICATES