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
 
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 Compare yesterday's date to the one o... migusd SYNCSORT 8 Fri Sep 22, 2017 11:35 pm
No new posts Validate the Date girishb2 DFSORT/ICETOOL 9 Tue Sep 19, 2017 1:12 am
No new posts Julian Date to CICS ABSTTIME blayek CICS 3 Wed Aug 30, 2017 11:15 pm
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts Validate date and numeric fields and ... Rick Silvers DFSORT/ICETOOL 6 Thu May 11, 2017 6:51 pm

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