Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Obtaining a signed value when updating triler using TRLUPD

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Shrikant Kumar

New User


Joined: 15 Jul 2014
Posts: 2
Location: India

PostPosted: Wed Dec 24, 2014 11:04 pm    Post subject: Obtaining a signed value when updating triler using TRLUPD
Reply with quote

I have a file that is present in the following format
Header Record
Detail Record - 1
Detail Record - 2
Detail Record- 3
Trailer Record

In the Trailer Record I am taking in the count of total number of records present which in the above case works out to 3.

I have a requirement to update the number of records on file in the Trailer record which i am completing by making use of the IFTRAIL and TRLUPD functions.

I have my sortcard as below

Code:
 
OPTION COPY
OUTFIL FNAMES=OUT12,
    IFTRAIL=(HD=YES,TRLID=(1,2,ZD,EQ,+9),
    TRLUPD=(14:COUNT=(M11,LENGTH=4)))


Now, my problem is that the Output COUNT that appears should be an Signed value.

For Example: if the count of records comes out to 4 then i want it represented in the Trailer as 0004F. I want the Sign bit as well to show if it's positive or negative. I realise that the count of records will always be Positive but i still have to display that Sign bit.

Please let me know how this can be achieved in TRLUPLD part itself.

Thank You,
Healy

Duplicate in Students and Beginners
Back to top
View user's profile Send private message

Shrikant Kumar

New User


Joined: 15 Jul 2014
Posts: 2
Location: India

PostPosted: Fri Dec 26, 2014 11:39 am    Post subject: Reply to: Obtaining a signed value when updating triler usin
Reply with quote

Hello,

For those interested I solved the problem and am posting the solution

Code:

OUTFIL FNAMES=OUT12,                       
    IFTRAIL=(HD=YES,TRLID=(1,1,ZD,EQ,+9),   
    TRLUPD=(7:COUNT=(TO=ZDC,LENGTH=4)))     
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1806
Location: NY,USA

PostPosted: Tue Dec 30, 2014 3:45 am    Post subject:
Reply with quote

Thats right.. and this would help.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Updating a VSAM file with DISP=OLD sheersh JCL & VSAM 8 Tue Mar 14, 2017 6:14 pm
No new posts Updating the counters after eliminati... PANDU1 DFSORT/ICETOOL 12 Mon Nov 21, 2016 9:47 am
No new posts Updating Cursor row withour using FOR... chandan.inst DB2 15 Tue Nov 08, 2016 11:17 am
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us