View previous topic :: View next topic
|
Author |
Message |
satheshbabur
New User
Joined: 25 Aug 2017 Posts: 2 Location: Germany
|
|
|
|
Hello,
I need solution for the below requirement in the DFSORT or ICEMAN.
The dataset is VB format of LRECL=3000
The record is in below format of hexadecimal values.
- Header Record
Code: |
ABCD12345
WEWR1234
ABCD12345
JJHHD1234
........... |
- data record
- Trailer Record - With record count as 4 in packed decimal format at position 6
My Requirement is to remove both duplicate records 'ABCD12345' from the dataset and update the trailer record With record count as '2'.
Kindly provide sort JCL to solve.
Coded |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
Kindly provide standard billing rates to write JCL and control cards. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
Recommended activity:
1. RTFM
2. Create "Sort JCL" as you understand it
3. Try to run it
4. Analyze error messages (if any)
5. Fix the problems discovered
6. Present your code, and results to the forum, and ask for help |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Note that sort JCL is specified in the manual and is pretty clear:
Code: |
jobcard
//STEP EXEC PGM=DFSORT
//SYSOUT |
etc, etc
But why should I repeat what is in the manual?
Presumably you know the sort control statements that you need as you did not ask about them (they are not JCL). |
|
Back to top |
|
|
satheshbabur
New User
Joined: 25 Aug 2017 Posts: 2 Location: Germany
|
|
|
|
Oops, sorry i did not post what i used in sort, as i thought it was too large to post.
Step1
The parameter was used to remove the both Duplicate records and it works fine with ICEMAN.
SELECT FROM(SORTIN) TO(NODUPS) ON(5,16,PD) NODUPS
Step2
The below parameter was used to update the trailer, it throws error 'OUTREC RDW NOT INCLUDED'. I use the VB file with LRECL=3000
Code: |
SORT FIELDS=COPY
OUTREC IFOUTLEN=3000,
IFTHEN(WHEN=INIT,OVERLAY=(3001:SEQNUM,5,PD)),
IFTHEN=(WHEN=(3,4,PD,EQ,X'9999'),
OVERLAY=(2:3001,5,PD,SUB,+2,PD,LENGTH=5))
|
I need help to solve the above in single steps.
Coded |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
I bet it did not "throw an error" as the mainframe never throws anything.
You have been given a perfectly good error message - why not use it. You could search the forum, it occur many times, or Google. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
Back to top |
|
|
|