Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search 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
Author Message
julian123

New User


Joined: 14 Aug 2006
Posts: 23

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
References
PostPosted: Wed May 28, 2008 12:26 pm    Post subject: Re: how to copy this two headers Reply with quote

Manuneedhi K

Active User


Joined: 07 May 2008
Posts: 121
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

DFSORT Developer


Joined: 07 Dec 2007
Posts: 298
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: 121
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
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1