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 Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts copy SEQ to PDS and create stats steve-myers JCL & VSAM 7 Thu Apr 27, 2017 1:15 am


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