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

Need to align data fields in between a record.


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

New User


Joined: 02 Dec 2008
Posts: 2
Location: Bangalore

PostPosted: Tue Dec 02, 2008 3:17 pm
Reply with quote

Please help

here is the input record:

Code:

---7----+----8----+----9----+----0----
  1  2097187  16371   SUM_C001
  1  2099404  16369   SUWM0002
  1  2099424  16331   SUPBSMIS
  1  2099426  16341   MAYFIEJA
500  -2147483648    16376   TDPUSER
500  -2147483648    16377   TDPUSER


I need to align 16371,16369,16331,16341 with 16376 and 16377 so they start from same pos 87. (shift by 4 spaces)

Also I need to align all the names starting at pos 89 with TDPUSER so that they start from same pos 95(shift by 4 spaces)

None of the records should be dropped.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


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

PostPosted: Tue Dec 02, 2008 10:22 pm
Reply with quote

You didn't do a very good job of explaining the "rules". But assuming you want to shift fields in the records that have a '1' in position 69, you can use a DFSORT job like this:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(69,1,CH,EQ,C'1'),
    BUILD=(1,80,87:81,5,95:89,8))
/*


If that's not what you want to do, then you need to explain more clearly what is is exactly that you want to do.
Back to top
View user's profile Send private message
entebbe2094

New User


Joined: 02 Dec 2008
Posts: 2
Location: Bangalore

PostPosted: Wed Dec 03, 2008 10:51 am
Reply with quote

I apologize if my explanation wasnt good enough .. Ill just try out the code that you have suggested and will let you know ... Thanks so much for your reply ...
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Wed Dec 03, 2008 3:31 pm
Reply with quote

ent,

Do as Frank suggested and it would work.

Btw

Quote:
I need to align 16371,16369,16331,16341 with 16376 and 16377 so they start from same pos 87. (shift by 4 spaces)
Also I need to align all the names starting at pos 89 with TDPUSER so that they start from same pos 95(shift by 4 spaces)


You will have to shift by 6 bytes and not 4 as mentioned in your first post.
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 How to split large record length file... DFSORT/ICETOOL 8
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts To find whether record count are true... DFSORT/ICETOOL 6
Search our Forums:

Back to Top