MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Generating Files

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 11:33 am    Post subject: Generating Files Reply with quote

Hi All,

I have a requirement to create a almost 700 Control Card.Similar to the contents in the existing Control card

For eg :

A=Key
B-DDN
C=XXXX_001.txt


Line 1 and 2 is unchange but line 3 C=XXXX_001.txt must be unique(i.e. XXX_002.txt should be used for the 2nd Control card and so on...)

The line 3 can be anything with .txt, but must be unique.

Is there anyway to automate the approch to create number of control crads..I m thinking rather than using contrl cards, to use 700 PS files.


Your suggestion are welcome
Back to top
View user's profile Send private message
superk
Advanced


Joined: 19 Dec 2002
Posts: 684
Topics: 5

PostPosted: Thu May 04, 2006 12:22 pm    Post subject: Reply with quote

First of all, what do you consider to be the difference between (I'm using YOUR terminology):

Quote:

... rather than using contrl cards, to use 700 PS files ...


I think creating 700 members of a PDS would be the easiest approach.
Back to top
View user's profile Send private message
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 12:31 pm    Post subject: Reply with quote

Thanks for your quick response

Nothing difference.But I felt creating PS files may be easier.

Could you please post code for creating members(CONTRL CARD) in a PDS or PS files!!!whatever based on my requirement.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu May 04, 2006 12:40 pm    Post subject: Reply with quote

Bravo,

isn't it as simple as this ?

Code:

//STEP0100 EXEC PGM=EZTPA00                   
//STEPLIB  DD DSN=EASYTREV.LOADLIB,
//            DISP=SHR                       
//SYSPRINT DD SYSOUT=*                       
//SYSOUT   DD SYSOUT=*                       
//FILEOUT  DD SYSOUT=*,                       
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)
//SYSIN    DD *                               
                                               
                                               
  FILE FILEOUT FB (0 0)                       
       OUT-REC             01 80    A         
       LINE1-REC           01 05    A         
       LINE2-REC           01 05    A         
       LINE3-FLD1          01 07    A         
       LINE3-SEQ           08 03    N         
       LINE3-FLD2          11 04    A         
                                               
  W-SUB W 02 B 0                               
                                               
  JOB INPUT NULL                               
                                               
   W-SUB          = 1                         
   DO UNTIL W-SUB > 700                       
      OUT-REC     =  ' '                       
      LINE1-REC   = 'A=KEY'                   
      PUT FILEOUT                             
      OUT-REC     =  ' '                       
      LINE1-REC   = 'B=DDN'                   
      PUT FILEOUT                             
      OUT-REC     =  ' '                       
      LINE3-FLD1  = 'C=XXXX_'                 
      LINE3-SEQ   = W-SUB                     
      LINE3-FLD2  = '.TXT'                     
      PUT FILEOUT   
      W-SUB       = W-SUB + 1                       
   END-DO                                     
   STOP                                       
/*                                             


Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 1:05 pm    Post subject: Reply with quote

Kolusu thanks for the solution!!.

But the ezt will generate all in one output file.But I need as separate in files or members in PDS.

I am going to use these CONTROL CARDS in a PROC which does FTP and some additional process.There are nearly 700 source files and the destination must be unique which .txt as extension.

Creating 700 controls cards manually might take time.So I am looking for some automated process to create.

I hope you understand the requirement.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu May 04, 2006 1:37 pm    Post subject: Reply with quote

Bravo,

Bravo,

It is quite simple to create pds from sequential file. Try this job.

Code:

//STEP0100 EXEC PGM=EZTPA00                               
//STEPLIB  DD DSN=CORP.EASYTREV.PROD.LOADLIB,             
//            DISP=SHR                                   
//SYSPRINT DD SYSOUT=*                                   
//SYSOUT   DD SYSOUT=*                                   
//FILEOUT  DD DSN=&T1,DISP=(,PASS),SPACE=(CYL,(1,1),RLSE),
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=0)           
//*                                                       
//SYSIN    DD *                                           
                                                         
  FILE FILEOUT FB (0 0)                                   
       OUT-REC             01 80    A                     
       LINE0-REC           01 18    A                     
       LINE0-SEQ           19 05    A                     
       LINE1-REC           01 05    A                     
       LINE2-REC           01 05    A                     
       LINE3-FLD1          01 07    A                     
       LINE3-SEQ           08 03    N                     
       LINE3-FLD2          11 04    A                     
                                                         
  W-SUB W 02 B 0                                         
                                                         
  JOB INPUT NULL                                         
   W-SUB          = 1                                         
   DO UNTIL W-SUB > 700                                       
      OUT-REC     =  ' '                                       
      LINE0-REC   = './ ADD    NAME=MEM'                       
      LINE0-SEQ   = W-SUB                                     
      PUT FILEOUT                                             
      OUT-REC     =  ' '                                       
      LINE1-REC   = 'A=KEY'                                   
      PUT FILEOUT                                             
      OUT-REC     =  ' '                                       
      LINE1-REC   = 'B=DDN'                                   
      PUT FILEOUT                                             
      OUT-REC     =  ' '                                       
      LINE3-FLD1  = 'C=XXXX_'                                 
      LINE3-SEQ   = W-SUB                                     
      LINE3-FLD2  = '.TXT'                                     
      PUT FILEOUT                                             
      W-SUB = W-SUB + 1                                       
   END-DO                                                     
   STOP                                                       
/*                                                             
//*************************************************************
//* THIS STEP CREATES PDS FROM A SEQUENTIAL FILE              *
//*************************************************************
//STEP0200 EXEC PGM=IEBUPDTE,PARM=NEW                         
//*                                                           
//SYSUT2   DD DSN=YOUR NEW PDS,                         
//            DISP=(NEW,CATLG,DELETE),                         
//            UNIT=PROD,                                       
//            SPACE=(CYL,(10,10,200),RLSE)                     
//SYSPRINT DD SYSOUT=*                                         
//SYSIN    DD DSN=&T1,DISP=(OLD,PASS)                         
/*                                                           


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 2:47 pm    Post subject: Reply with quote

Kolusus..

Will the PDS have 700 members with the below result,

Mem1

A=Key
B-DDN
C=XXXX_001.txt


Mem2

A=Key
B-DDN
C=XXXX_002.txt

Mem3

A=Key
B-DDN
C=XXXX_003.txt
.
.
.
Mem700
A=Key
B-DDN
C=XXXX_700.txt

Please correct me if i'm wrong
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu May 04, 2006 2:49 pm    Post subject: Reply with quote

Quote:

Will the PDS have 700 members with the below result,


Bravo,

Yes 8)

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 4:51 pm    Post subject: Reply with quote

I am getting the following Error
Code:

       SYSIN                            NEW MASTER                 
       A=KEY                                                       
IEB806I STATEMENT SEQUENCE ERROR.                                   
IEB808I TERMINATED THIS MEMBER. IEBUPDTE WILL TRY NEXT MEMBER.     
IEB818I HIGHEST CONDITION CODE WAS 00000004                         
IEB819I END OF JOB IEBUPDTE.                                       


Here is the JCL..
Code:

//STEP0200 EXEC PGM=IEBUPDTE,PARM=NEW     
//*                                       
//SYSUT2   DD DSN=XXXXX.CNTL.PDS,     
//            DISP=(NEW,CATLG,DELETE),     
//            UNIT=PROD,                   
//            SPACE=(CYL,(10,10,200),RLSE)
//SYSPRINT DD SYSOUT=*                     
//SYSIN    DD DSN=&T,                     
//            DISP=(OLD,PASS)
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Thu May 04, 2006 4:55 pm    Post subject: Reply with quote

Bravo,

May be you overlooked the changes I made to the EZT step. Take a look at my ezt code once again and re run the job once again

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Bravo
Beginner


Joined: 05 Dec 2005
Posts: 26
Topics: 12

PostPosted: Thu May 04, 2006 6:13 pm    Post subject: Reply with quote

Runs like a charm...


Thanks for all your help..I really appreciate
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group