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

Insert a one record dynamically


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Sat Nov 08, 2008 1:58 am
Reply with quote

I am creating a file in second step . In that file I need to put '00000000' in position 9,8 in next step.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sat Nov 08, 2008 3:09 am
Reply with quote

Hello,

You need to better describe your request.

Post some input and the output you want to be created when that input is processed.

Mention the recfm and lrecl of both files.
Back to top
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Sat Nov 08, 2008 11:36 am
Reply with quote

Jeya,

Quote:
In that file I need to put '00000000' in position 9,8 in next step.


After the second step, add a SORT step to OVERLAY the data from col 9 of length 8.

As suggested, post few more details of the file. Is that a VB or FB? What actually are you doing with that file in the 3rd step?
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Mon Nov 10, 2008 8:31 pm
Reply with quote

Hi,

I am creating one new file. I need to add below record to that file,
' 00000000 '
The LRECL is 24 and recfm is VB. I will read the file in the next step which will execute a application program.

I need to avoid 'file is empty' error that's the reason I need to a record.

Thanks,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Nov 10, 2008 10:33 pm
Reply with quote

Chennai,

Here's a DFSORT job that will do what I think you asked for. You said you wanted the constant in position 9, but I assumed you were not counting the RDW, so it would really be position 13. (If you were counting the RDW, then change 9: to 5:).

Code:

//S1    EXEC  PGM=ICEMAN                                           
//SYSOUT    DD  SYSOUT=*                                           
//SORTIN DD DSN=...  input file (VB/24)                               
//SORTOUT DD DSN=...  output file (VB/24)     
//SYSIN    DD    *                                                 
  OPTION COPY                                                       
  OUTFIL REMOVECC,                                                 
    TRAILER1=(9:C'00000000')                                       
/*
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Mon Nov 10, 2008 11:09 pm
Reply with quote

Thanks Frank.
This is working fine. But both my input file and output file are same. So is there any way to use Dummy file in SORTIN and use this file in sortout?
I tried the same but i am getting below error

ICE043A 3 INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN RECFM

I suppose, I am getting this because of no DCB attributes in Dummy file. Is there any way to fix it up?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Mon Nov 10, 2008 11:22 pm
Reply with quote

I don't understand. You say the input file and output file are the same, but then you ask if you can use a DUMMY file for SORTIN. That makes no sense. What does your input file look like? What do you want the output file to look like? Using the same file for input and output is NOT a good idea.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue Nov 11, 2008 12:34 am
Reply with quote

Hi Frank,

I believe the requirement is to generate a single-record output file with the zeros as the only record. . .
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Nov 11, 2008 12:41 am
Reply with quote

Quote:
I believe the requirement is to generate a single-record output file with the zeros as the only record. . .


Well, if there's no input file, and we just have to generate an output file containing one record with zeros, this would do it:

Code:

//S1    EXEC  PGM=ICEMAN                                             
//SYSOUT    DD  SYSOUT=*                                             
//SORTIN DD DUMMY,RECFM=VB,LRECL=24,BLKSIZE=28                       
//SORTOUT DD DSN=...  output file (VB/24)     
//SYSIN    DD    *                                                   
  OPTION COPY                                                       
  OUTFIL REMOVECC,                                                   
    TRAILER1=(9:C'00000000')                                         
Back to top
View user's profile Send private message
jeyaseelan347
Warnings : 1

New User


Joined: 05 Sep 2008
Posts: 37
Location: Chennai

PostPosted: Tue Nov 11, 2008 1:20 am
Reply with quote

Thanks Frank
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
Search our Forums:

Back to Top