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

Date on header


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

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Dec 17, 2008 12:35 pm
Reply with quote

I have an input file like this

VICE LEVEL SUMMARY REPORT 12/16/08 PAGE 1

WHSE UNITS WHSE PURCH UNITS
73 43.19 29813
0 0.00 591

In this
VICE LEVEL SUMMARY REPORT 12/16/08

is the header which has a date 12/16/08 at position say 60

I need to create an output file with the date as a sperate field like


WHSE UNITS WHSE PURCH UNITS DATE
73 43.19 29813 12/16/08
0 0.00 591 12/16/08

ie, to take the header date from input file and place it as a seperate field in output file using DFSORT
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 17, 2008 1:34 pm
Reply with quote

Prasanth,

Quote:
e, to take the header date from input file and place it as a seperate field in output file using DFSORT


This can be done using SYMNAMES. Search the forum for working examples.
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 17, 2008 1:56 pm
Reply with quote

Prasanth,

I had a similar reqt before and was lucky enough to get the solution. Check the below link, try and post if you face any problems.

SYMNAMES
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Dec 17, 2008 2:32 pm
Reply with quote

Thanks Aaru icon_biggrin.gif
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed Dec 17, 2008 10:23 pm
Reply with quote

prasanthhere,

You can very easily push the value on the header records on to the detail records using the new WHEN=GROUP function of DFSORT available with z/OS DFSORT V1R5 PTF UK90013 (July, 2008) like this:

Code:

//STEP0100 EXEC PGM=ICEMAN                                       
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD *                                                   
VICE LEVEL SUMMARY REPORT 12/16/08 PAGE 1                         
WHSE UNITS WHSE PURCH UNITS                                       
73 43.19 29813                                                   
0 0.00 591                                                       
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  SORT FIELDS=COPY                                               
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(12,14,CH,EQ,C'SUMMARY REPORT'),
  PUSH=(30:27,8))                                                 
  OUTFIL OMIT=(12,14,CH,EQ,C'SUMMARY REPORT')                     
//*                                                               


The output from this job is

Code:

WHSE UNITS WHSE PURCH UNITS  12/16/08
73 43.19 29813               12/16/08
0 0.00 591                   12/16/08


If you don't have the July, 2008 PTF installed, ask your System Programmer to install it (it's free).

For complete details on the new WHEN=GROUP and the other new functions available with PTF UK90013, see:

Use [URL] BBCode for External Links
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Thu Dec 18, 2008 10:09 am
Reply with quote

Hi Kolusu,

That was a great solution. DFSORT team Rocks icon_biggrin.gif
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 Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts Need help to append a date&tsp at... DFSORT/ICETOOL 9
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:

Back to Top