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
 
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 Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts opening a dataset after reading it fr... arunsoods DFSORT/ICETOOL 5 Wed Oct 04, 2017 3:54 pm
No new posts Addition of two records on 2 fields amar143 SYNCSORT 8 Tue Oct 03, 2017 11:14 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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