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

Updating the Trailer count in variable Record Format dataset


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

New User


Joined: 25 Aug 2017
Posts: 2
Location: Germany

PostPosted: Wed Aug 30, 2017 9:49 pm
Reply with quote

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.
Code:

00000
0F00F
- Header Record
Code:

ABCD12345
WEWR1234
ABCD12345
JJHHD1234
...........
- data record
Code:

99999004
9F99F00C
- 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
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Wed Aug 30, 2017 9:56 pm
Reply with quote

Kindly provide standard billing rates to write JCL and control cards.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Thu Aug 31, 2017 12:56 am
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Aug 31, 2017 4:00 am
Reply with quote

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
View user's profile Send private message
satheshbabur

New User


Joined: 25 Aug 2017
Posts: 2
Location: Germany

PostPosted: Thu Aug 31, 2017 1:32 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Thu Aug 31, 2017 4:16 pm
Reply with quote

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
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Thu Aug 31, 2017 11:37 pm
Reply with quote

Read here, if you still struggles then post us back.
ibmmainframes.com/about33728.html
ibmmainframes.com/about65055.html
ibmmainframes.com/about50817.html
ibmmainframes.com/about1093.html
ibmmainframes.com/about33728-15.html
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 Populate last day of the Month in MMD... SYNCSORT 2
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the count of rows for every 1 ... DB2 3
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
Search our Forums:

Back to Top