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
 

 

Create an Command Dataset with DFSORT

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

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Fri May 15, 2009 5:15 pm    Post subject: Create an Command Dataset with DFSORT
Reply with quote

Hi All


Input File = VBA 133 (position of xxucat01 = 22 and for Namea also 22)

catalog --- xxucat01
alias Namea
catalog --- yyucat01
catalog --- zzucat01
alias Nameb
alias Namec
alias Named

The Output File should be: (VBA 133) and contain the following
IDCAMS Commands.
DEFINE ALIAS (NAME(Namea) REL(xxucat01))
DEFINE ALIAS (NAME(Nameb) REL(zzucat01))
DEFINE ALIAS (NAME(Namec) REL(zzucat01))
DEFINE ALIAS (NAME(NAMEd) REL(zzucat01))


Some catlog --- statements contain up to 500 alias entries.

Can I do this with DFSORT?
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 May 15, 2009 9:39 pm    Post subject:
Reply with quote

Quote:
position of xxucat01 = 22 and for Namea also 22


Does that starting position count the 4 byte RDW and 1 byte carriage control character, or is it the data position so the real position is 22+5 = 27?

What is the starting position of 'catalog'?

What is the starting position of 'alias'?
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Fri May 15, 2009 10:24 pm    Post subject: Reply to: Create an Command Dataset with DFSORT
Reply with quote

Hi Frank

The starting positions contains the 4 bytes RDW + the 1 byte
carriage control character.

The starting position of catalog is 10
The starting position of alias is 16

Roland
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Fri May 15, 2009 10:58 pm    Post subject:
Reply with quote

Rolant_Achtsnit,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                     
//SYSOUT   DD SYSOUT=*                                       
//SORTIN   DD DSN=Your input 133 vba dataset,disp=shr
//SORTOUT  DD SYSOUT=*                                       
//SYSIN    DD *                                             
  SORT FIELDS=COPY                                           
  INREC IFTHEN=(WHEN=GROUP,BEGIN=(10,7,CH,EQ,C'CATALOG'),   
  PUSH=(31:22,8))                                           
  OUTREC IFTHEN=(WHEN=INIT,                                 
  OVERLAY=(22:22,22,SQZ=(SHIFT=LEFT,LEAD=C'(',MID=C') REL(',
           TRAIL=C'))')))                                   
                                                             
  OUTFIL INCLUDE=(16,5,CH,EQ,C'ALIAS'),                     
  BUILD=(1,5,C'DEFINE ALIAS (NAME',22,22,133:X)
/*
Back to top
View user's profile Send private message
Roland_Achtsnit

New User


Joined: 30 Jul 2006
Posts: 14

PostPosted: Sat May 16, 2009 5:27 pm    Post subject: Reply to: Create an Command Dataset with DFSORT
Reply with quote

Wow

It works fine.

Thanks

Roland
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 Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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