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
 

 

file alignment using ICETOOL

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

New User


Joined: 23 Dec 2005
Posts: 61
Location: Providence , US

PostPosted: Thu Aug 31, 2006 7:14 pm    Post subject: file alignment using ICETOOL
Reply with quote

Hi all,

I have a problem where there is a header starting with 0, this data needs to be appended before the data which is start ing from the next line... till a 1 is received in the same column .
i.e starting from 0 abc home cob in my example to 1OMP009 .
The input file have many groups like these where the header starts with 0 followed by header name thus i need to copy all the header names before my data , The amount of data in these groups starting from 0 to 1 is not fixed and may vary from group to group .

Code:

0ABC HOME COB- AC  I/P                                                 
                GROUP/SUBGROUP             NUM OF CLMS      POTENTIAL LI
 -------------------------------------     -----------      ------------
                   136  1                        1                   .00
                 8W205  1                        1                   .00
                CZFONE  1                        1              4,959.12
                101261  1                        2              6,693.50
                                                                       
 ABC HOME COB- AC  I/P                           5             11,652.62
1OMP009/OABC19/ABCDEI /08/30/06            ABCDE ABCSDEE LIABILITY -  SA
                                                                       
0ABC HOME COB- AC  O/P    136  1                        1                   .00
                 GROUP/SUBGROUP             NUM OF CLMS      POTENTIAL LI


This is my input file and the o/p file should look like this :

Code:

0ABC HOME COB- AC  I/P GROUP/SUBGROUP  NUM OF CLMS  POTENTIAL
0ABC HOME COB- AC  I/P              136  1                1                   .00
0ABC HOME COB- AC  I/P         8W205  1                1                   .00
0ABC HOME COB- AC  I/P        CZFONE  1               1               4959.12


Thus , i have do the data shifting also as header should come first followed by data . As given in my output file .
How can i do the same using ICETOOL .
Thanks in advance .

Regards
Vishal
Back to top
View user's profile Send private message

saithvis2

New User


Joined: 23 Dec 2005
Posts: 61
Location: Providence , US

PostPosted: Thu Aug 31, 2006 7:25 pm    Post subject: Re: file alignment using ICETOOL
Reply with quote

Hi all,

My appoligies the o/p file should look like this:

Code:

0ABC HOME COB- AC  I/P GROUP/SUBGROUP     NUM OF CLMS 
0ABC HOME COB- AC  I/P              136     1 ...
0ABC HOME COB- AC  I/P         8W205     1  ..       
0ABC HOME COB- AC  I/P        CZFONE    1 ...


Actually , the header should get appended before the data . (I am just facing some problem while alignment of the data while posting . )

Regards
Vishi
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Aug 31, 2006 9:26 pm    Post subject:
Reply with quote

Your posts are very confusing, so it's not clear what you want to do.

Are you trying to extract the bytes (which bytes?) from each record that starts with '0' (the header record) and add those bytes at the front of each subsequent record in the "group"?

Your output only shows some of the records in the first group. Do you want to delete some records from each group? If so, what are the "rules" for which records you want to keep/delete?

Please show a better example of your input records with several groups, and all of the corresponding expected output records you want.

Also, give the RECFM and LRECL of the input file.
Back to top
View user's profile Send private message
saithvis2

New User


Joined: 23 Dec 2005
Posts: 61
Location: Providence , US

PostPosted: Thu Aug 31, 2006 9:47 pm    Post subject: Re: file alignment using ICETOOL
Reply with quote

Hi Frank,

My applogies for the confusion.

Quote:

Are you trying to extract the bytes (which bytes?) from each record that starts with '0' (the header record) and add those bytes at the front of each subsequent record in the "group"?


Yes, i am trying to extract the header name to all the subsequent records in that group till we receive a 1 in column 1 . (which will be clear from my new example). Header is of 15 bytes excluding column 1 thus from byte 2 to 16 th respectively.

Quote:

Your output only shows some of the records in the first group. Do you want to delete some records from each group? If so, what are the "rules" for which records you want to keep/delete?

No, i dont want to delete any of the subsequent records from the input file . only the header name should be appended in front of subsequent data.

Quote:

Please show a better example of your input records with several groups, and all of the corresponding expected output records you want.


New Example:

0Header 1
data 1 data11 data111 ..........
data2 data22 data222.........
............
1xyz
0Header2
data a dataa dataaaa .......
data b databb databbb....

O/p :

Header1 data1 data11 data111.......
header1 data2 data22 data222....
........... this will continue for all data of header1 till 1 comes in first column
header2 dataa dataaa dataaaa
header2 datab databb databbb.....

Quote:

Also, give the RECFM and LRECL of the input file.


RECFM=FBA and lrecl =133 .
Header to be copied is of 15 bytes in the input file.
The subsequent data is starting from 10th byte and extends till 133.
Thus the output file needs to be 148 bytes in length . (header + data in
subsequent row).

Please do let me know , if I am not clear.
And My applogies once again as I missed out on the basic requirements for the question. icon_sad.gif


Regards,
Vishal
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Sep 07, 2006 4:48 am    Post subject:
Reply with quote

The "Include or omit groups of records" Smart DFSORT Trick shows a method for propagating a field to a group of records. I believe you can adapt it to do what you want to do.
Back to top
View user's profile Send private message
saithvis2

New User


Joined: 23 Dec 2005
Posts: 61
Location: Providence , US

PostPosted: Thu Sep 07, 2006 5:32 pm    Post subject: Re: file alignment using ICETOOL
Reply with quote

Hi Frank,

Thanks alot ! it worked brilliantly ... I modified it a bit as per my requirements... here is the modified requirements.

Header was from 2 nd to 27 byte .
The group sequence number was placed at column no 161 to 168.
And, the temporary number for calculating the sequence number was placed starting from column no. 169.

In my requirement , the group header was needed to come in first and not at the last , so i swapped the same . The input file was of FBA format and lrecl being 133 respectively. Moreover , I also did not wanted any of the data to be deleted from 133 so i expanded the record length to 160. (i.e. 133 + 27 length for header) and also the header portion i.e. the first duplicate of the group or the base should not come in the output so i removed the KEEPBASE option from the jcl.

Here is the modifed job :

Code:

//S1 EXEC PGM=ICETOOL                                     
//TOOLMSG DD  SYSOUT=*                                     
//DFSMSG  DD  SYSOUT=*                                     
//IN      DD  DISP=SHR,DSN=XN06TSO.OCL.SUMM.APR06         
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(35,5)),DISP=(,PASS)
//T2 DD DSN=&&T2,UNIT=SYSDA,SPACE=(CYL,(35,5)),DISP=(,PASS)
//OUT     DD  DSN=SYSPGRP.VZS.SUMM.APR06.INT2,             
//             SPACE=(CYL,(30,2),RLSE),                   
//             DCB=(RECFM=FBA,LRECL=160),                 
//             DISP=(NEW,CATLG,DELETE)                     
//*                                                       
//TOOLIN DD *                                             
COPY FROM(IN) TO(T1) USING(CTL1)                           
SPLICE FROM(T1) TO(T2) ON(161,8,ZD) -                     
  WITHALL WITH(1,133) USING(CTL2)                         
COPY FROM(T2) TO(OUT) USING(CTL3)                         
/*                                                         
//CTL1CNTL DD *                                             
  INREC IFTHEN=(WHEN=INIT,                                   
            OVERLAY=(161:SEQNUM,8,ZD)),                     
        IFTHEN=(WHEN=(1,1,CH,EQ,C'0'),                       
            OVERLAY=(134:2,27,161:SEQNUM,8,ZD)),             
        IFTHEN=(WHEN=NONE,                                   
            OVERLAY=(169:SEQNUM,8,ZD,                       
                     161:161,8,ZD,SUB,169,8,ZD,M11,LENGTH=8))
/*                                                           
//CTL2CNTL DD *                                             
    OUTFIL FNAMES=OUT,BUILD=(1,160)                         
/*                                                           
//CTL3CNTL DD *                                             
    SORT FIELDS=COPY                                         
    OUTFIL OUTREC=(1:134,27,X,29:2,132)                 
/*                                                           


Thanks once again .... icon_biggrin.gif

Regards,
Vishal
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Thu Sep 07, 2006 9:36 pm    Post subject:
Reply with quote

Glad I could help. Sorry for my delayed response, but I missed your response the first time.

You don't appear to need the second COPY - you can just do the same thing in the CTL2CNTL BUILD for SPLICE, e.g.

Code:

...
SPLICE FROM(T1) TO(OUT) ON(161,8,ZD) -                     
  WITHALL WITH(1,133) USING(CTL2)   
...
//CTL2CNTL DD *
  OUTFIL FNAMES=OUT,BUILD=(1:134,27,X,29:2,132)
Back to top
View user's profile Send private message
Alain Benveniste

New User


Joined: 14 Feb 2005
Posts: 88

PostPosted: Thu Sep 07, 2006 11:51 pm    Post subject:
Reply with quote

... and the 1st COPY too if you have the April, 2006 DFSORT PTF installed icon_biggrin.gif

Alain
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
Location: San Jose, CA

PostPosted: Fri Sep 08, 2006 2:56 am    Post subject:
Reply with quote

Alain,

Yes, of course you're right. I missed that. Thanks.
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
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
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 How to generate a new unique Input fi... for1ranjith CLIST & REXX 11 Sat Jul 01, 2017 12:09 pm
No new posts Writing a file using online program grvtomar PL/I & Assembler 3 Fri Jun 30, 2017 1:06 pm


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