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
 

 

Help required in DFSORT/ICETOOL

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

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed Oct 20, 2010 5:32 pm    Post subject: Help required in DFSORT/ICETOOL
Reply with quote

Hi

I Have a requirement like below:

INPUT FILE:(FB/LRECL 60)
Code:

110 00010000000000
120 00000100000000
130 000000010000000000
140 0000000001000000000000
150 00000000000100
160 00000000000001
170 01010000000000000000
210 00010100000000


OUTPUT FILE: (FB/LRECL 63)
Code:

110;[01;00;00;00;00;00;00;];
120;[00;01;00;00;00;00;00;];
130;[00;00;01;00;00;00;00;00;00];
140;[00;00;00;01;00;00;00;00;00;00;00];
150;[00;00;00;00;01;00;00;];
160;[00;00;00;00;00;01;00;];
170;[00;00;00;00;00;00;01;00;00;00];
210;[01;01;00;00;00;00;00;];



Length of the record is not fixed in Input file. Can anyboby please suggest how to do this?

Thanks
Back to top
View user's profile Send private message

GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed Oct 20, 2010 6:17 pm    Post subject:
Reply with quote

DFSORT Version that I am using is : 5694-A01, Z/OS DFSORT V1R10
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Wed Oct 20, 2010 6:26 pm    Post subject:
Reply with quote

What are the rules for getting from the input to the output?
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed Oct 20, 2010 6:32 pm    Post subject:
Reply with quote

Craq,

Thanks for the reply.

Here after every First three characters of the records, one semicolon is needed in the o/p.
And, for rest of the record from 5th postion, I need to have one square bracket '[' and from there onwards after every two characters, i need to insert semicolon.(these characters are always paired like 00;00;00) then at the end of the each record '];' is required.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Wed Oct 20, 2010 6:42 pm    Post subject:
Reply with quote

I had checked the o/p file that i had mentioned above. I am very sorry for the mistake while pasting the o/p file contents. That was just a typo. please find below how the o/p file will look like:

Code:

110;[01;00;00;00;00;00;00;];
120;[00;01;00;00;00;00;00;];
130;[00;00;01;00;00;00;00;00;00;];
140;[00;00;00;01;00;00;00;00;00;00;00;];
150;[00;00;00;00;01;00;00;];
160;[00;00;00;00;00;01;00;];
170;[00;00;00;00;00;00;01;00;00;00;];
210;[01;01;00;00;00;00;00;];


Sorry for the inconvenience caused
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: Wed Oct 20, 2010 11:06 pm    Post subject:
Reply with quote

I think you still have the output wrong. For example, the first line of the output should be:

Code:

110;[00;01;00;00;00;00;00;]; 


Given that, here's a DFSORT job that will do what you want:

Code:

//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=...  input file (FB/60)
//SORTOUT DD DSN=...  output file (FB/63)
//SYSIN DD *
  OPTION COPY
  INREC IFTHEN=(WHEN=INIT,
   BUILD=(1,3,C';[',5,2,X,7,2,X,9,2,X,
    11,2,X,13,2,X,15,2,X,17,2,X,
    19,2,X,21,2,X,23,2,X,25,2,X,27,2,X,29,2,X,
    31,2,X,33,2,X,35,2,X,37,2,X,39,2)),
  IFTHEN=(WHEN=INIT,
    OVERLAY=(6:6,53,SQZ=(SHIFT=LEFT,MID=C';',TRAIL=C';];',
      LENGTH=58)))
/*


If the input file had:

Code:

110 00010000000000                             
120 00000100000000                             
130 000000010000000000                         
140 0000000001000000000000                     
150 00000000000100                             
160 00000000000001                             
170 01010000000000000000                       
210 00010100000000                             
220 010203040506070809101112131415161718       


The output file would have:

Code:

110;[00;01;00;00;00;00;00;];
120;[00;00;01;00;00;00;00;];
130;[00;00;00;01;00;00;00;00;00;];
140;[00;00;00;00;01;00;00;00;00;00;00;];
150;[00;00;00;00;00;01;00;];
160;[00;00;00;00;00;00;01;];
170;[01;01;00;00;00;00;00;00;00;00;];
210;[00;01;01;00;00;00;00;];
220;[01;02;03;04;05;06;07;08;09;10;11;12;13;14;15;16;17;18;];


If that's not what you want, then you need to do a better job of explaining what you do want.
Back to top
View user's profile Send private message
GaganGarg

Active User


Joined: 31 Mar 2010
Posts: 134
Location: India

PostPosted: Thu Oct 21, 2010 5:20 pm    Post subject:
Reply with quote

It worked like a Charm icon_biggrin.gif
Thanks a lot Frank.
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 DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Converting decimal to numeric using I... Balaryan DFSORT/ICETOOL 4 Thu Feb 02, 2017 11:27 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
No new posts How to delete second instance from Fl... Gunapala CN DFSORT/ICETOOL 6 Tue Oct 18, 2016 11:42 pm
No new posts ICETOOL/SYNCSORT - SYSPRINT output nartcr DFSORT/ICETOOL 17 Wed Oct 05, 2016 10:46 pm


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