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
 

 

Date on header

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Date on header
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: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 1:34 pm    Post subject: Reply to: Date on header
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: 1288
Location: Chennai, India

PostPosted: Wed Dec 17, 2008 1:56 pm    Post subject: Reply to: Date on header
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    Post subject:
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    Post subject:
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:

www.ibm.com/systems/support/storage/software/sort/mvs/ugpf/
Back to top
View user's profile Send private message
Aaru

Senior Member


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

PostPosted: Thu Dec 18, 2008 10:09 am    Post subject: Reply to: Date on header
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    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 TOT & DATE parameter in ICEMAN hemanthj642 DFSORT/ICETOOL 4 Mon Nov 14, 2016 5:19 am
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
This topic is locked: you cannot edit posts or make replies. Get correct date and time when curren... balaji81_k DB2 24 Fri Oct 14, 2016 10:40 pm
No new posts Change date (DD/MM/YY) in 2nd record ... uday kiran DFSORT/ICETOOL 12 Wed Sep 07, 2016 10:57 pm
No new posts Add system date inside of a PS file a... pramitdas DFSORT/ICETOOL 5 Sun Aug 28, 2016 12:06 am


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