IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Help required on FILEAID BATCH DD Statement


IBM Mainframe Forums -> Compuware & Other Tools
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Wed Dec 12, 2007 8:33 pm
Reply with quote

Hi,

There is an input date file. there are a few output files.
DD01 = Datecard.file { 20 LRECL}
DD02 = Output {80 LRECL}
DD03 = Output {80 LRECL}
DD04 = Output {80 LRECL} .....

I would like to copy the 5 chars from pos. 12 from DD01 to 45th pos. in DD02, DD03 etc... output files. What are the statements to use in JCL.

Your immediate response is greatly appreciated!!

Thank you
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Fri Dec 14, 2007 12:31 pm
Reply with quote

Mai,

Quote:
I would like to copy the 5 chars from pos. 12 from DD01 to 45th pos. in DD02, DD03 etc... output files. What are the statements to use in JCL.

Its confusing. Could you explain clearly.

Also, show some examples of your req.
Back to top
View user's profile Send private message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Fri Dec 14, 2007 8:24 pm
Reply with quote

Oops!! Unfortunately, over explanation turned out to be confusing.

There is one I/P File.
Layout
DATE 20071023 DATADATADAT

O/P File 1: xxxxxxxxx20070101 xxxxxxxxxxxxxxxx
O/P File 2: yyyyyyyyy20070201 yyyyyyyyyyyyyyyy
etc...

I would want to replace only the O/P file date value with the I/P file. There are multiple o/p files with different dates.

The result should be

O/P File 1: xxxxxxxxx20071023 xxxxxxxxxxxxxxxx
O/P File 2: yyyyyyyyy20071023 yyyyyyyyyyyyyyyy

How to achieve this thru FILEAID Batch control card.
Thank you
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Sat Dec 15, 2007 3:07 am
Reply with quote

You could probably accomplish this using two FILEAID steps. The 1st step reads the DATE record and creates the $$DD02 through $$DD04 control cards to UPDATE the other files in position 45.

Code:

//FILEAID1 EXEC PGM=FILEAID                                 
//SYSPRINT DD  SYSOUT=*                                     
//DD01     DD *                                             
      DATE 20071023                                         
//DD01O    DD DSN=HLQ.FILEAID.CONTROL.CARD,                 
//            DISP=(NEW,CATLG),                             
//            UNIT=(SYSDA),SPACE=(TRK,(1,1),RLSE),         
//            DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920)         
//SYSIN    DD  *                                           
$$DD01 USER PADCHAR=C' ',                                   
       IF=(12,NE,C" "),                                     
       MOVE=(1,C"$$DD02 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O,                         
       MOVE=(1,C"$$DD03 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O,                         
       MOVE=(1,C"$$DD04 UPDATE REPL=(45,C'"),MOVE=(26,8,12),
       MOVE=(34,C"')"),WRITE=DD01O                         
/*                                                         


The HLQ.FILEAID.CONTROL.CARD dataset should now contain:
Code:

$$DD02 UPDATE REPL=(45,C'20071023')   
$$DD03 UPDATE REPL=(45,C'20071023')   
$$DD04 UPDATE REPL=(45,C'20071023')   


The HLQ.FILEAID.CONTROL.CARD dataset should now be brought into the 2nd FILEAID step as SYSIN.

The HLQ.TEST1, HLQ.TEST2, and HLQ.TEST3 files are input as DD02, DD02, and DD04, respectfully.

HLQ.TEST1 contains:
Code:

 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx


HLQ.TEST2 contains:
Code:

yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy


HLQ.TEST3 contains:
Code:

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz   


The 2nd FILEAID step should execute with:
Code:

//FILEAID2 EXEC PGM=FILEAID                           
//SYSPRINT DD  SYSOUT=*                               
//DD02     DD DISP=SHR,DSN=HLQ.TEST1                   
//DD03     DD DISP=SHR,DSN=HLQ.TEST2                   
//DD04     DD DISP=SHR,DSN=HLQ.TEST3                   
//SYSIN    DD DISP=SHR,DSN=HLQ.FILEAID.CONTROL.CARD   


After it executes, the output looks like the following:

HLQ.TEST1:
Code:

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx20071023xxxxx


HLQ.TEST2:
Code:

yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 
yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy20071023yyyyy 


HLQ.TEST3:
Code:

zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 
zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz20071023zzzzz 


If this is not your exact requirement, you can probably adjust the JCL and control cards as needed.
Back to top
View user's profile Send private message
Mai

New User


Joined: 12 Dec 2007
Posts: 4
Location: California

PostPosted: Sun Dec 16, 2007 8:10 am
Reply with quote

Hi cpuhawg,

Thank you very much for your response. This is truly the solution. I would n't be trying this till next work day but great tweaking on Control card. My query can be considered resolved. I appreciate your time & Effort. Thank you Mai
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> Compuware & Other Tools

 


Similar Topics
Topic Forum Replies
No new posts Search two or more word with FILEAID Compuware & Other Tools 15
No new posts How to get a stack trace on a looping... ABENDS & Debugging 5
No new posts Calling Java method from batch COBOL ... COBOL Programming 5
No new posts Help in Automating Batch JCL jobs mon... JCL & VSAM 3
No new posts Batch install term/printer CICS 2
Search our Forums:

Back to Top