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

File Aid used in Jcl


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

New User


Joined: 09 Oct 2007
Posts: 1
Location: chennai

PostPosted: Thu Oct 11, 2007 5:27 pm
Reply with quote

>Input record .:

Vin# Module Configuration data
(starts from position 1st) (start its from 118th position) (starts from 148th position)

1FMEU31K48LA05353 CFG_726_WB_00 123456789012345678901234567890
1FMEU31K48LA05353 CFG_726_WB_01 12324567500000000000
1FMEU31K48LA05353 CFG_726_WB_02 5748749590079997997
1FMEU31K48LA05353 CFG_726_WB_03 65758697054345756886
1FMEU31K48LA05353 CFG_726_WB_04 12672589638907490670
1FMEU31K48LA05353 CFG_726_WB_05 1200 ---------------------------------------------> This data will remain as it is (1200)
1FMEU31K48LA05353 CFG_726_WB_06 01234567890
1FMEU31K48LA05353 CFG_726_WB_07 12768469283679237590
1FMEU31K48LA05353 CFG_726_WB_08 12769123472875089325
1FMEU31K48LA05353 CFG_726_WB_09 1234567890 ------------------------------------> this data should change to "8001000000"
1FMEU31K48LA05353 CFG_726_WB_0A 123456789012222222

00,01,02,03,04,05,06,07,08,09,0A===> block number. Each block can hold up to max of 50 bytes(100 characters),




2 >Requirement:

a> 10 th position of the Vin# = 7 0r 8
11th position of the Vin# = L
and 1FMEU31K48LA05353 CFG_726_WB_05 1200
;
:
then 1FMEU31K48LA05353 CFG_726_WB_09 8001000000



3>Failaid that I wrote for the above requirement:

//CSSTEP1A EXEC PGM=FILEAID
//SYSPRINT DD SYSOUT=*
//SYSLIST DD SYSOUT=*
//SYSTOTAL DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//DD01 DD DSN=IFS1965.TEST.BCE.INPUT.DATA,
// DISP=SHR
//DD01O DD DSN=IFS1965.BCE.OUT1,
// DISP=(,CATLG,DELETE),
// DCB=(RECFM=FB,LRECL=264,BLKSIZE=27984),
// SPACE=(CYL,(10,10),RLSE)
//SYSIN DD *
$$DD01 COPYALL IF=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
AND=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 '),
/*


When I execuite this fileaid Data not yet changed as per the requirement.
Please correct the FileAid if it wrong and please tell any other ways to satisfy the above condition apart from fileaid.
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Thu Oct 11, 2007 5:55 pm
Reply with quote

Sunil,

Link for your previous post on the same issue. -

ibmmainframes.com/viewtopic.php?t=25110
Back to top
View user's profile Send private message
murmohk1

Senior Member


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

PostPosted: Thu Oct 11, 2007 6:07 pm
Reply with quote

Sunil,

Quote:
AND=(118,EQ,C'CFG_726_WB_05'),

Quote:
AND=(118,EQ,C'CFG_726_WB_09'),

I have not used FA in batch mode much.

Check the possibility of TWO values occuring at 118 position in the SAME record.

Revisit your control card and put the conditions properly.
Back to top
View user's profile Send private message
cpuhawg

Active User


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

PostPosted: Thu Oct 11, 2007 6:13 pm
Reply with quote

You are on the right track:

Code:

$$DD01 COPYALL IF=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
AND=(10,EQ,C'8'),AND=(11,EQ,C'L'),
AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 '),


If effect, the code above states that 'CFG_726_WB_05' and 'CFG_726_WB_09' must be in the same position because you connected all the logic with ANDs.

Your code should look like:

Code:

$$DD01 COPYALL IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_05'),AND=(148,EQ,C'1200'),
 REPL=(148,C'1200'),
 IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 ')


This codes state if position 10 is EQ to '7' or '8' and position 11 is EQ to 'L' and position 118 is EQ to 'CFG_726_WB_05' and position 148 is EQ to '1200', then replace 148 with '1200'. It then checks to see if position 10 is EQ to '7' or '8' and position 11 is EQ to 'L' and position 118 is EQ to 'CFG_726_WB_09', then replace position 148 with '8001000000 '. All records all copied from the input to the output file because you are using COPYALL.

If the '1200' isn't going to change, there is no need to have the logic for that. You could use:

Code:

$$DD01 COPYALL IF=(10,EQ,C'7,8'),AND=(11,EQ,C'L'),
 AND=(118,EQ,C'CFG_726_WB_09'),REPL=(148,C'8001000000 ')
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 FTP VB File from Mainframe retaining ... JCL & VSAM 1
No new posts Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top