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 Fail to change physical VSAM filename... jacobdng CICS 6 Fri Jan 20, 2017 12:36 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm


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