Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Modifying record with X'FFFFFFFF'

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

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Sat May 05, 2012 12:34 am    Post subject: Modifying record with X'FFFFFFFF'
Reply with quote

Hi,

I am trying to work on a scenario where i need to update the last record in the file.

Input file if of 32500 Reclength.

File Data looks like this.

Code:

----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
***************************** Top of Data ******************************
            12123                                                       
000000000000FFFFF4444444444444444444444444444444444444444444444444444444
000000000000121230000000000000000000000000000000000000000000000000000000
-----------------------------------------------------------------------
PAYM  O¶    ¾     `T715014         ð                1715014     S1894628
DCED00DB0001B002007EFFFFFF01014400080000000044444444FFFFFFF00101EFFFFFFF
71840166000F9C2202937150140A0A0000AC0000000000000000171501400A0A21894628
-----------------------------------------------------------------------
      â  qo"  q ¤                                                       
FFFF00430997009394444444444444444444444444444444444444444444444444444444
FFFF0F2F086F0088F0000000000000000000000000000000000000000000000000000000


In this I want to update the last record . Value to be replaced are

Code:

--+--
*****
-  -
  q ¤
00939
0088F


Starting position will be 13 and I I need to update it like.

Code:

--+--
*****
-  -
  q ¤
00001
0000F


I am not able to do it. Can please suggest some idea on this.

Thanks
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 05, 2012 1:00 am    Post subject:
Reply with quote

Hello,

Will the last record always have x'FFFFFFFF' in the first 4 bytes?

Will the last record be the only record that can have x'FFFFFFFF' in the first 4 bytes?

Will the replacement value always be the same?

Is there some reason this packed-decimal field contains the F-sign rather than the more typical C-sign?
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Sat May 05, 2012 1:08 am    Post subject: Reply to: Modifying last record in file
Reply with quote

Hi Dick,

Thanks for the quick response


Quote:

Will the last record always have x'FFFFFFFF' in the first 4 bytes?

Yes

Quote:

Will the replacement value always be the same?


Yes

Quote:

Is there some reason this packed-decimal field contains the F-sign rather than the more typical C-sign?

Not sure but it will be like this only.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat May 05, 2012 1:29 am    Post subject:
Reply with quote

scorp_rahul23,

Assuming that ONLY the last record has X'FFFFFFFF' in the first 4 bytes the following DFSORT JCL will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT                       
//SYSOUT   DD SYSOUT=*                         
//SORTIN   DD DSN=your input 32500 FB file,DISP=SHR
//SORTOUT  DD SYSOUT=*                         
//SYSIN    DD *                               
  SORT FIELDS=COPY                             
  INREC IFTHEN=(WHEN=(1,4,CH,EQ,X'FFFFFFFF'), 
  OVERLAY=(13:+1,TO=PDF,LENGTH=5))             
//*     
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Sat May 05, 2012 1:29 am    Post subject:
Reply with quote

Here's a DFSORT job that will do what you asked for:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=(1,4,BI,EQ,X'FFFFFFFF'),
    OVERLAY=(13:X'000000001F'))
/*
Back to top
View user's profile Send private message
scorp_rahul23

New User


Joined: 06 May 2008
Posts: 90
Location: Chennai

PostPosted: Sat May 05, 2012 2:13 am    Post subject: Reply to: Modifying last record in file
Reply with quote

Thanks a lot Frank and Skolusu.

Both approach worked .... icon_smile.gif
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 How to update a portion of text in a ... Bill Woodger DFSORT/ICETOOL 25 Wed Nov 09, 2016 9:41 pm
No new posts sort with previous record anatol DFSORT/ICETOOL 9 Thu Oct 06, 2016 2:36 am
No new posts Get Record count in summary record fo... Atul Banke DFSORT/ICETOOL 21 Fri Sep 23, 2016 4:17 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Using 'parm' to vary SORTOUT record v... Sysaron DFSORT/ICETOOL 13 Wed Sep 07, 2016 9:24 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us