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

Binary File format getting change while SFTP using BPXBATCH


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
shalva.krish

New User


Joined: 30 Aug 2023
Posts: 3
Location: USA

PostPosted: Fri May 03, 2024 7:07 am
Reply with quote

Dear Sir ,

I am using BPXBATCH utility for SFTP the file from mainframe to windows server, facing issue for binary files having packed decimals values , output formatting is not same and downstream process on windows is failing while validating the file.

I have used below in configuration to tackle binary file in BPXBATCH config

EOL=nl;
IMAGE=binary;

Batch job is completing successful. While validating the file , I see some junk characters & position of the data is getting shifted .

Please advise .

Regards
Shalva
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1334
Location: Bamberg, Germany

PostPosted: Fri May 03, 2024 7:31 am
Reply with quote

Please try without using EOL
Back to top
View user's profile Send private message
Faizanazam

New User


Joined: 06 Apr 2024
Posts: 7
Location: United States

PostPosted: Fri May 03, 2024 11:00 am
Reply with quote

Hi Sir,

As suggested , we tried running job without using EOL, but job failed with message "EDC5129I No such file or directory. (errno2=0x053B006C)"

But if EOL is added in config then job is completing successfully and transferring file but in bad format
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1334
Location: Bamberg, Germany

PostPosted: Fri May 03, 2024 12:40 pm
Reply with quote

Would you mind to share the Job you are using? It might help to look up things here and there.
Back to top
View user's profile Send private message
Faizanazam

New User


Joined: 06 Apr 2024
Posts: 7
Location: United States

PostPosted: Fri May 03, 2024 1:50 pm
Reply with quote

JCL


//STEP01 EXEC PGM=BPXBATCH
//STDPARM DD DSN=***.***.SFTPCP.GET,DISP=SHR
// DD DSN=***.***.SFTP.PARM,DISP=SHR
//STDIN DD DUMMY
//STDOUT DD DSN===*******.***.SFTP.PUT.OUT,
// DISP=(NEW,CATLG,CATLG),
// DCB=(RECFM=FB,LRECL=255,BLKSIZE=0),
// DATACLAS=MB020E
//STDERR DD DSN===*******.***.SFTP.PUT.ERR,
// DISP=(NEW,CATLG,CATLG),
// DCB=(RECFM=FB,LRECL=255,BLKSIZE=0),
// DATACLAS=MB020E
//SYSPRINT DD SYSOUT=*
//

Content of GET file "***.***.SFTPCP.GET"


sh SYS=ABC;
JOBNAME=XYZABC;
LOCALDATASET=ABCD.EFGH.DAILY.DT0503VB2;
LOCALPATH=/**pl/abc/devl/sftp/tmp/;
CONFIG=/**pl/abc/devl/sftp/.ssh/config;
REMOTEFILENAME=ABCD.EFGH.DAILY.DT0503VB2.bin;
RP=/;
EOL=nl;
IMAGE=binary;
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2140
Location: USA

PostPosted: Fri May 03, 2024 7:47 pm
Reply with quote

1) Please, learn how to use the Code button -

Faizanazam wrote:
JCL
Code:
//STEP01   EXEC PGM=BPXBATCH                                     
//STDPARM  DD  DSN=***.***.SFTPCP.GET,DISP=SHR               
//         DD  DSN=***.***.SFTP.PARM,DISP=SHR   
//STDIN    DD  DUMMY                                             
//STDOUT   DD  DSN===*******.***.SFTP.PUT.OUT,                     
//             DISP=(NEW,CATLG,CATLG),                           
//             DCB=(RECFM=FB,LRECL=255,BLKSIZE=0),               
//             DATACLAS=MB020E                                   
//STDERR   DD  DSN===*******.***.SFTP.PUT.ERR,                     
//             DISP=(NEW,CATLG,CATLG),                           
//             DCB=(RECFM=FB,LRECL=255,BLKSIZE=0),               
//             DATACLAS=MB020E                                   
//SYSPRINT DD  SYSOUT=*                                           
//           

Content of GET file "***.***.SFTPCP.GET"
Code:
 sh SYS=ABC;                                           
 JOBNAME=XYZABC;                                       
 LOCALDATASET=ABCD.EFGH.DAILY.DT0503VB2;     
 LOCALPATH=/**pl/abc/devl/sftp/tmp/;                   
 CONFIG=/**pl/abc/devl/sftp/.ssh/config;               
 REMOTEFILENAME=ABCD.EFGH.DAILY.DT0503VB2.bin;   
 RP=/;       
 EOL=nl;   
 IMAGE=binary;


2) Please, add also all produced logs, and all error messages (if any)
Back to top
View user's profile Send private message
Faizanazam

New User


Joined: 06 Apr 2024
Posts: 7
Location: United States

PostPosted: Mon May 06, 2024 11:35 pm
Reply with quote

Hi ,

I tried changing below configuration for binary files and it worked fine. Thanks for your help.

EOL=bin;
IMAGE=binary;
Back to top
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1334
Location: Bamberg, Germany

PostPosted: Tue May 07, 2024 12:13 am
Reply with quote

Thanks for the feedback.
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts Date format correction using dfsort DFSORT/ICETOOL 3
No new posts batch SFTP job using AOPBATCH unable ... All Other Mainframe Topics 7
No new posts BPXBATCH SFTP to remote path having s... All Other Mainframe Topics 6
No new posts how to eliminate null indicator value... DB2 7
Search our Forums:

Back to Top