IBM Mainframe Forum Index
 
Register
 
IBM Mainframe Forum Index Mainframe: Search Log in to check your private messages Log in
 

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

Active Member


Joined: 29 Apr 2008
Posts: 879
Location: Maryland

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: 2432
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: 2432
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: 2508
Location: NY,USA

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

Read here, if you still struggles then post us back.
Use [URL] BBCode for Links
Use [URL] BBCode for Links
Use [URL] BBCode for Links
Use [URL] BBCode for Links
Use [URL] BBCode for Links
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

 

Search our Forum:

Similar Topics
Topic Forum Replies
No new posts FILE STATUS - 39 ON VARIABLE LENGTH V... COBOL Programming 1
This topic is locked: you cannot edit posts or make replies. Splice JCL into one record for DD sta... SYNCSORT 2
No new posts Date format conversion DFSORT/ICETOOL 4
No new posts Copying data from prev record using SORT SYNCSORT 19
No new posts how to get total count from numeric d... SYNCSORT 9

Back to Top