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 copy this two headers

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

New User


Joined: 14 Aug 2006
Posts: 25

PostPosted: Wed May 28, 2008 12:26 pm    Post subject: how to copy this two headers
Reply with quote

i have an input file, have to convert amty from pd to ch, and output as following. now i use 8,8,PD,EDIT=(SIIIIIIIIIIIIT.TT),SIGNS=(,-) to do the conversion, it works well.
but i don't know how to copy the first two lines to output file, can anybody help. thanks very much.

input
Code:
2008-05-28-14.11.14.635536       <- timestamp
NAME,AMTY                        <- field name
6M6100,                          <- data
FDFFFF600000100                  <-  hex value
646100B0000000C                  <- hex value


output

Code:
2008-05-28-14.11.14.635536
NAME,AMTY
6M6100,      100.00
Back to top
View user's profile Send private message

Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Wed May 28, 2008 6:02 pm    Post subject:
Reply with quote

Hi ,

I just tried for these three records assuming the amount will always be the third record. I also tried to expand this assuming that the amount record will always be the record with record number as multiples of 3 but couldn't get the syntax of MOD (modulus) funtion right.

Here is the code which i used. This works if there are only 3 records. I am looking for something like WHEN=(71,8,ZD,MOD,=3,EQ,+0) i.e modulus of the seqnum divided by 3 should be zero. Sorry if i had deviated from the topic but just trying to experiment.

Code:


 OPTION COPY                                                     
 INREC OVERLAY=(71:SEQNUM,8,ZD)                                 
 OUTREC IFTHEN=(WHEN=(71,8,ZD,EQ,+3),                           
         BUILD=(1,7,8,8,PD,EDIT=(SIIIIIIIIIIIIT.TT),SIGNS=(,-)))
                                                                 
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed May 28, 2008 8:54 pm    Post subject: Reply to: how to copy this two headers
Reply with quote

Manuneedhi K,

Here is a DFSORT JCl which will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                                           
//SYSOUT   DD SYSOUT=*                                               
//SORTIN   DD *                                                       
2008-05-28-14.11.14.635536                                           
NAME,AMTY                                                             
                                                                     
2008-05-29-14.11.14.635536                                           
NAME,AMTY                                                             
                                                                     
//SORTOUT  DD SYSOUT=*                                               
//SYSIN    DD *                                                       
  SORT FIELDS=COPY                                                   
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(71:SEQNUM,8,ZD)),                 
        IFTHEN=(WHEN=INIT,OVERLAY=(71:71,8,ZD,MOD,+3,TO=ZD,LENGTH=8)),
        IFTHEN=(WHEN=(71,8,ZD,EQ,+0),                                 
       BUILD=(1,7,8,8,PD,EDIT=(SIIIIIIIIIIIIT.TT),SIGNS=(,-)))       
/*
Back to top
View user's profile Send private message
Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 115
Location: Chennai

PostPosted: Wed May 28, 2008 9:00 pm    Post subject:
Reply with quote

Thanks Kolusu. This is exactly what i was attempting but wasn't sure of the MOD syntax.
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 copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am
No new posts Copy load modules and alias vasanthz IBM Tools 5 Thu Apr 20, 2017 6:31 am
No new posts SORTJOIN - Copy Matched and Unmatched... Steve Ironmonger DFSORT/ICETOOL 5 Tue Jan 17, 2017 4:26 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts Copy RECFM =VB TO FB file with RECL =... sahil41352 DFSORT/ICETOOL 3 Wed Dec 28, 2016 11:29 pm


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