MAINFRAME - TIP OF THE DAY :
When you specified V for RECFM parameter, LRECL value is largest record in the file plus 4 bytes. These four bytes contain the actual length of each variable length record in the file
Programmers Voted for below topics. Please Vote for good Posts.
Thank You! for your feedback. Connecting to the server. Please Wait...
Joined: 18 Feb 2006 Posts: 812 Location: San Jose, CA
Posted: Mon Feb 09, 2009 9:17 pm Post subject:
I wish you would make more of an effort to match your examples to your descriptions and explain the "rules" for your examples.
What is the starting position and length of the key field you want to check for duplicates on? Why do you have the first two records in the output and the last two records in the output, but not the other four records? I don't see any difference between the 4 pairs of records.
Assuming your input records are already in order by the key (as shown in your example) and you want to restart the sequence numbers each time the key in positions 1-11 changes (just a guess on the key positions), you can do it with a DFSORT job like this:
If that's not what you want, then you need to do a better job of explaining what you do want. _________________ Frank Yaeger - DFSORT Development Team (IBM) - firstname.lastname@example.org
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
Frank, thanks for the reply. I will try to improve
The key here starts in 1st column and of 6 bytes length. I want this sequence number technique to be applied on certain key value only (ex. 123456). However, the code you have given here should work for me.
Thanks a lot. _________________ ========
Learn Which You Don't Know - Teach Others Which They Don't Know.
Posted: Tue Feb 10, 2009 2:59 pm Post subject: how to apply this technique?
How to apply the sequence number technique on below data? This dataset's LRECL=80 & RECFM=FB. The key field starts in 19th column and of 6 bytes. I want to apply 5 digit sequence number only for key value '161009' and it's next record (01 & 02) at column position 30.
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
Cobol Tutorial This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial This Tutorial covers all important aspects of DFSORT. Has more SORT examples