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
 

 

Need to change date in VB file.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sreejeshcs

New User


Joined: 28 May 2007
Posts: 26
Location: Pune

PostPosted: Wed Mar 11, 2009 8:00 pm    Post subject: Need to change date in VB file.
Reply with quote

Could you help me to solve the below scenario?

A Variable Block file having several Rec type ( Rec type 00,10,11,12... )
75th Position on the Rec type 10 having a date field in the format 20071231, I need to change all the date in the same field to 20091231.
I/P may contain multile Rec 10.

How can I do this using ICEMAN
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: Wed Mar 11, 2009 9:19 pm    Post subject:
Reply with quote

It's not clear what you want to do.

What is the starting position of the record type (remember to count the RDW in positions 1-4)?

What is the starting position of the date you want to change (remember to count the RDW in positions 1-4)?

Do you want to change the date to '20091231' in every type 10 record, or only in type 10 records that currently have '20071231' for the date?
Back to top
View user's profile Send private message
sreejeshcs

New User


Joined: 28 May 2007
Posts: 26
Location: Pune

PostPosted: Thu Mar 12, 2009 12:24 pm    Post subject:
Reply with quote

Code:

//TEST01    PROC                                   
//             SOUT=J                                                   
//STEP010  EXEC PGM=FILEAID                                             
//*INPUT FILE                                                           
//DD01     DD  DSN=PREFIX.BP860.STREAM.GENERIC,DISP=SHR       
//*OUTPUT FILE                                                         
//DD01O    DD  DSNPREFIX.BP860.STREAM.GENERIC,DISP=OLD       
//*            UNIT=&UNIT,                                             
//*            DCB=(RECFM=VB,LRECL=148,DSORG=PS),                       
//*            SPACE=(CYL,(1,30),RLSE)                                 
//SYSIN    DD  DSN=&PREFIX1..PARMS(TEST02),DISP=SHR                     
//SYSOUT   DD  SYSOUT=&SOUT                                             
//SYSABEND DD  SYSOUT=&SOUT                                             
//SYSABOUT DD  SYSOUT=&SOUT               
****************************
PARM : TEST02
****************************
££DD01 USER RDW=3,MOVE=(1,0,1),             
       IF=(1,NE,C'10'),WRITE=DD01O,         
       IF=(1,EQ,C'10'),                     
       MOVE=(75,C'20090401'),WRITE=DD01O     
****************************


I need to replace the FileAid utility with ICEMAN.
Rec type 10 is starting from Position 1. and the date will populate from position 75.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu Mar 12, 2009 9:03 pm    Post subject:
Reply with quote

Sreejesh

Here are the equivalent control cards for sort

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=PREFIX.BP860.STREAM.GENERIC,DISP=SHR
//SORTOUT  DD DSN=your output file,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *                                                     
  INREC IFTHEN=(WHEN=(5,2,CH,EQ,C'10'),OVERLAY=(79:C'20090401'))
  SORT FIELDS=COPY                                                   
/*
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: Thu Mar 12, 2009 9:05 pm    Post subject:
Reply with quote

Sreejesh ,

I don't know FileAid, but I can guess from what you posted that the answers to my questions are as follows:

Quote:
What is the starting position of the record type (remember to count the RDW in positions 1-4)?


5

Quote:
What is the starting position of the date you want to change (remember to count the RDW in positions 1-4)?


79

Quote:
Do you want to change the date to '20091231' in every type 10 record, or only in type 10 records that currently have '20071231' for the date?


In every type 10 record.

In which case, you can use this DFSORT job:

Code:

//S1    EXEC  PGM=SORT
//SYSOUT    DD  SYSOUT=*
//SORTIN  DD DSN=PREFIX.BP860.STREAM.GENERIC,DISP=SHR
//SORTOUT DD DSNPREFIX.BP860.STREAM.GENERIC,DISP=OLD
//SYSIN    DD    *
  OPTION COPY
  INREC IFTHEN=(WHEN=(5,2,CH,EQ,C'10'),OVERLAY=(79:C'20090401'))
/*
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 Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 1 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 3 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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