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
 

 

Need to align data fields in between a record.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Need to align data fields in between a record.
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 Moderator


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

PostPosted: Tue Dec 02, 2008 10:22 pm    Post subject:
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    Post subject: Reply to: Need to align data fields in between a record.
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: 1288
Location: Chennai, India

PostPosted: Wed Dec 03, 2008 3:31 pm    Post subject: Reply to: Need to align data fields in between a record.
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    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 Sorting group data rajella DFSORT/ICETOOL 3 Sun Jan 22, 2017 11:32 pm
No new posts SYNCSORT SEQNUM and FI fields. nartcr SYNCSORT 5 Sat Jan 21, 2017 4:02 am
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am


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