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
 

 

How to Convert Fields of a record (Rows) into Columns

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

New User


Joined: 05 Nov 2006
Posts: 4

PostPosted: Wed Nov 08, 2006 5:07 am    Post subject: How to Convert Fields of a record (Rows) into Columns
Reply with quote

Hi,

I have an Input file for the Amount fields(14 Bytes for Each field and the last byte is a signed bit) as follows


Code:

January         February         March

0000341269.40 0000000741.25-0000058721.31
0214000215.29 0005420990.32 0000003350.56
0000004023.13-0000004542.00 0000064288.39-


I want the Records of the input file to be wriiten as written as follows

Code:

0000341269.40       0214000215.29       0000004023.13-
0000000741.25-      0005420990.32       0000004542.00
0000058721.31       0000003350.56       0000064288.39-


Rows are to be displayed as columns

Let me know How to do it Using DFSort ?

Regards,
Krish
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: Wed Nov 08, 2006 5:28 am    Post subject:
Reply with quote

Assuming you just have the three input records as shown, this DFSORT/ICETOOL job will do what you asked for:

Code:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=...  input file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//OUT DD DSN=...  output file
//TOOLIN DD *
COPY FROM(IN) USING(CTL1)
SPLICE FROM(T1) TO(OUT) ON(61,1,CH) -
 WITHEACH WITH(21,14) WITH(41,14)  USING(CTL2)
/*
//CTL1CNTL DD *
  OUTFIL FNAMES=T1,
   IFTHEN=(WHEN=INIT,OVERLAY=(62:SEQNUM,1,ZD)),
   IFTHEN=(WHEN=(62,1,ZD,EQ,+1),
    BUILD=(1:1,14,61:C'1',/,1:15,14,61:C'2',/,1:29,14,61:C'3')),
   IFTHEN=(WHEN=(62,1,ZD,EQ,+2),
    BUILD=(21:1,14,61:C'1',/,21:15,14,61:C'2',/,21:29,14,61:C'3')),
   IFTHEN=(WHEN=(62,1,ZD,EQ,+3),
    BUILD=(41:1,14,61:C'1',/,41:15,14,61:C'2',/,41:29,14,61:C'3'))
/*
//CTL2CNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(1,60)
/*
Back to top
View user's profile Send private message
Krishnamurthy

New User


Joined: 05 Nov 2006
Posts: 4

PostPosted: Thu Nov 09, 2006 6:03 am    Post subject: Re: How to Convert Fields of a record (Rows) into Columns
Reply with quote

Thanks for your Quick response.
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 Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


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