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
 

 

to extract record starting from variable position by DFSORT

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

New User


Joined: 17 Sep 2007
Posts: 3
Location: kolkata

PostPosted: Fri Oct 12, 2007 2:28 pm    Post subject: to extract record starting from variable position by DFSORT
Reply with quote

Hi All,

My inputfile is of 60 bytes containing JOBNAME(1:8)and PARMLIB DSN(10:50).Now this PARMLIB DSN also contains the membername within it, for example:LIB.FCS1.PARMLIB(xxxx)
LIB.APPLI1.PARMLIB(YYY)
So the member name xxxx and YYY are starting from a different positions in the inputfile depending on the length of the PARMLIB-name.
So is it possible to get an output file containing JOBNAMEs and only the member names(ie.only xxxx or YYY) 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: Fri Oct 12, 2007 4:01 pm    Post subject: Reply to: to extract record starting from variable position
Reply with quote

As per your subject, you want this to be done using DFSORT. How about doing this in REXX?
Back to top
View user's profile Send private message
arnab.ece

New User


Joined: 17 Sep 2007
Posts: 3
Location: kolkata

PostPosted: Fri Oct 12, 2007 5:30 pm    Post subject: to extract record starting from variable position by DFSORT
Reply with quote

Actually I can do it in a cobol program using UNSTRING but all the other output files can be generated by a simple sort so i was asking whether this can be done by sort or not.And as per as REXX is concerned it is not approved by the client
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 Oct 12, 2007 9:04 pm    Post subject:
Reply with quote

arnab,

Here's a DFSORT job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD DSN=...  input file (FB/60)
//SORTOUT DD DSN=...  output file (FB/17)
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%01=(ABSPOS=10,STARTAFT=C'(',ENDBEFR=C')',FIXLEN=8)),
    BUILD=(1,8,X,%01)
/*


If your input was:

Code:

JOB1                       LIB.FCS1.PARMLIB(XXXX)
JOB2                       LIB.APPLI1.PARMLIB(YYY)
JOB30                      ABC.DEF(MEMBER10)     


SORTOUT would have:

Code:

JOB1     XXXX     
JOB2     YYY       
JOB30    MEMBER10 
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 Oct 12, 2007 9:09 pm    Post subject:
Reply with quote

Quote:
As per your subject, you want this to be done using DFSORT. How about doing this in REXX?


Aaru,

Why would you suggest REXX for this when the poster specifically asked for a DFSORT solution?
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sat Oct 13, 2007 11:42 am    Post subject: Reply to: to extract record starting from variable position
Reply with quote

Frank,

Quote:
Why would you suggest REXX for this when the poster specifically asked for a DFSORT solution?


I had a similar requirement few months back and i did it using REXX. That is the reasonf for my asking. I was not aware that this can be done using SORT.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sat Oct 13, 2007 12:27 pm    Post subject: )
Reply with quote

Aaru,

I was used to be an 'only REXX script solution type'. But when the input file is large (100,000 of 133 recln) the space required by excio will exceed you limits and you are then forced into managing your reads and writes - which not only complicates the coding but reeaaaaaally slows down the REXX processing speed.

Frank and his team have sophisticated DFSORT/ICETOOL to the point that the capabilities of DFSORT and (when parsing/manipulation becomes really crazy) REXX scripts there is no need for outside tools like ezytrieve. IBM should give the DFSORT team a medal - actually bonuses - because of this added marketing feature!

I have replaced many of my REXX Scripts (and I have 1000's) with DFSORT. The main advantage is that for my team members not familiar with REXX, DFSORT is not as big a 'black hole' as REXX is. Though there are a lot of super REXXers following these forums and providing answers, none of them are developers of the product (REXX) and none of them are as nice about answering questions as Frank is about DFSORT, of which he is a product developer.

Search thru this website's jcl and utilities forums and I think that you will be surprised at the parsing and concatenation capabillites of DFSORT. File size and recln are not an issue with DFSORT and sorting in REXX can become very time intensive.

Don't misunderstand me, I love REXX. But I prefer to use it primarily as Edit Macros, Panel drivers and Utility connectors (using alloc and invoking different utilities - e.g. DSN, DFSORT, etc..). Only when the rip&strip requirements exceed that of a one-pass DFSORT or the file is small and I have something already scripted do I employ REXX. Otherwise I look thru my PDF's (I save every new Frank-DFSORT solution as a PDF - have quite a library) for a DFSORT solution.

Also, you should not limit your tool-box (skill set) to just a couple of hammers and wrenches.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Sat Oct 13, 2007 1:15 pm    Post subject: Reply to: to extract record starting from variable position
Reply with quote

dbzTHEdinosauer,

Quote:
Search thru this website's jcl and utilities forums and I think that you will be surprised at the parsing and concatenation capabillites of DFSORT.


Yes, i searched after seeing Frank's post and was really surprised with the capabilities of DFSORT. yep, i do have the latest version of that PDF.

Quote:
Don't misunderstand me,


I can't misunderstand you for enlightening me, I can only thank you! [icon_smile.gif]
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: Sat Oct 13, 2007 10:35 pm    Post subject:
Reply with quote

Quote:
I had a similar requirement few months back and i did it using REXX. That is the reason for my asking. I was not aware that this can be done using SORT.



Aaru,

It can be done using DFSORT's PARSE function which has been available since April, 2006. Since you're using Syncsort, you can't do it. Perhaps that's why you're not aware of it.
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: Sat Oct 13, 2007 10:35 pm    Post subject:
Reply with quote

Dick,

Thanks so much for the kind words. You made my day!
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Mon Oct 15, 2007 11:27 am    Post subject: Re: )
Reply with quote

dbzTHEdinosauer wrote:
Frank and his team have sophisticated DFSORT/ICETOOL to the point that the capabilities of DFSORT and (when parsing/manipulation becomes really crazy) REXX scripts there is no need for outside tools like ezytrieve. IBM should give the DFSORT team a medal - actually bonuses -because of this added marketing feature!

Too right..due to these feactures of DFSORT..I'm planning to change my current shop (which make use of other SORT product & my first question in new shop, before joining, would be ..do you use DFSORT icon_smile.gif ). DFSORT/ICETOOL are just amazing ..no doubt. Thanks Frank for being here.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1288
Location: Chennai, India

PostPosted: Mon Oct 15, 2007 11:43 am    Post subject: Reply to: to extract record starting from variable position
Reply with quote

Frank,

Quote:
Aaru,

Since you're using Syncsort, you can't do it. Perhaps that's why you're not aware of it.


Hmm Yes. Its high time to install DFSORT in my site. I Should get it done to be more productive.
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: Mon Oct 15, 2007 9:35 pm    Post subject:
Reply with quote

Quote:
Hmm Yes. Its high time to install DFSORT in my site. I Should get it done to be more productive.


Note that you'd have to convince your site to license it before you could use it. They might not be that open to paying for two sort products or replacing the current sort product with another one. But more power to you if you can make it happen.

If you want me to send you some documents that discuss migration considerations, send me an e-mail offline (yaeger@us.ibm.com). Put "DFSORT" in your Subject line to catch my attention.
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 Record Not found in AlX but record re... mukun264 COBOL Programming 4 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts IMS DB-How to update a record (a sing... Nic Clouston IMS DB/DC 9 Thu Mar 09, 2017 4:38 pm
No new posts Extract set of records matching on ac... bhaskar_kanteti DFSORT/ICETOOL 3 Mon Mar 06, 2017 7:19 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


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